Ok but my problem is is that in the process of doing that, numbers can be released so they pretty much haft to be dynamic. Any idea how I do it with that.

IE:

1
2
3
6
9
10
...

So if them numbers change, which they can, because they are assigned port numbers for servers, How do I make it so they are not scripted statically.


----- Original Message ----- From: "Chris" <[EMAIL PROTECTED]>
To: "Rob W." <[EMAIL PROTECTED]>
Cc: <php-general@lists.php.net>
Sent: Sunday, June 18, 2006 8:38 PM
Subject: Re: [PHP] Ok next php problem


Rob W. wrote:
I got the previous question answered, Now here's my next problem.

With the numbers displaying correctly again I got:

1
2
3
4
5
6
7
10
11
12
13
14
15
16
17
18
19
20
21
22
25

listed in that order in the database

Now i'm trying to figure out how to write a syntax saying that if like number 8 isnt listed, display it.

Get them both into arrays and compare:

$good_list = range(1,10);
$db_list = array(4,7,10);

$missing = array_diff($good_list, $db_list);

http://php.net/array_diff

--
Postgresql & php tutorials
http://www.designmagick.com/



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to