RE: [PHP] Logic headache, please help.

2002-11-11 Thread Marco Tabini
Crockford wrote: > > > > > > -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. &g

RE: [PHP] Logic headache, please help.

2002-11-11 Thread Tony Crockford
> -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

Re: [PHP] Logic headache, please help.

2002-11-11 Thread Marco Tabini
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++