Re: Returning Lowest Number Not In Array
| From: | Phillip Bow | Date: | Thu, 03 May 2001 21:40:43 +0000 |
| Subject: | Re: Returning Lowest Number Not In Array | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-51340@lists.php.net to get a copy of this message | ||
rsort($array);
$nextNum = $array[0] + 1;
You may have to include the numerical flag, but I don't think so.
--
phill
"Mike Potter" <mikep@oeone.com> wrote in message
news:3AF15CE1.2020709@oeone.com...
> 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.
> For example:
> Given this array : return this:
>
> (0, 0) 1
> (1,0) 2
> (1,2,0) 3
> (3,0) 1
> (1, 3) 2
>
> Does anyone have any code, or any hints on how to go about this? I've
> worked on it for a few hours, and am really stuck.
> Thanks,
> Mike
>
> Mike Potter
> OEone Corp.
> http://www.oeone.com
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>