Re: Ok next php problem

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

 



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