> -----Original Message-----
> From: Marco Tabini [mailto:marcot@;tabini.ca]
> Sent: 11 November 2002 14:46
> To: Tony Crockford
> Cc: Php-General@Lists. Php. Net
> Subject: Re: [PHP] Logic headache, please help.
>
>
> How about building an array of all the levels:
>
> $a = array();
>
> for ($i = 1; $i <= $maxlevels; $i++)
> $a[] = $i;
>
> then for each level you can create a new array that is the difference
> between the original array and an array that contains the
> current level:
>
> for ($i = 1; $i <= $maxlevels; $i++)
> $a1 = ;
> echo '<option value="' . implode ('|', array_diff ($a,
> array($i))) .
> '">Level ' . $i;
>
> I'm not 100% that this will work right off the bat, but it should at
> least put you on the right track... if not out of your misery :-)
>
> Hope this helps.
It looks like it might, but I note this warning in the manual
re:array_diff
Warning
This was broken in PHP 4.0.4!
http://www.php.net/manual/en/function.array-diff.php
is it fixed in 4.06 do you know? (host uses 4.06, I have 4.2.2)
TIA
Tony
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php