Re: Ok next php problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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" <dmagick@xxxxxxxxx>
To: "Rob W." <rob@xxxxxxxxxxxxxxx>
Cc: <php-general@xxxxxxxxxxxxx>
Sent: Sunday, June 18, 2006 8:38 PM
Subject: Re:  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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux