RE: [PHP] Returning Lowest Number Not In Array
| From: | Matthew Luchak | Date: | Thu, 03 May 2001 13:43:15 +0000 |
| Subject: | RE: [PHP] Returning Lowest Number Not In Array | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-51266@lists.php.net to get a copy of this message | ||
pseudo code:
for($i=-1; $i < count($my_array); $i++) {
if (!in_array($i,$my_array)){echo $i; exit;}
}
should do it.....
____________________________
Matthew Luchak
Webmaster
Kaydara Inc.
mluchak@kaydara.com
-----Original Message-----
From: Mike Potter [mailto:mikep@oeone.com]
Sent: Thursday, May 03, 2001 9:28 AM
To: php-general@lists.php.net
Subject: [PHP] Returning Lowest Number Not In Array
Hi all:
I'm hoping someone can help me out with this array problem. I'm
trying to find the lowest number which is not in the array.