Justtechjobs.com Find a programming school near you






Online Campus Both


php-general | 2001032

Re: [PHP] 'How to jump..' part 2 From: David Robley (huntsman <email protected>)
Date: 03/25/01

On Mon, 26 Mar 2001 08:25, Christian Dechery wrote:
> Regarding my last email (about jumping the first 7 rows of an array)...
>
> why does this code doesnt work?
>
> for(reset($array),$count=0;$count<6;next($array),$count++);
> ____________________________
> . Christian Dechery (lemming)
> . http://www.tanamesa.com.br
> . Gaita-L Owner / Web Developer

I don't think PHP will understand commas as command separators.

Perhaps what you could try is a simple loop 0 to 6 and for each iteration
of the loop, unset the corresponding array element

for($i=0; $i <= 6; $i++) {
 unset($array[$i];
 }

Better still if you have PHP4, use array_shift to pop the first however
many elements from the front of the array.

-- 
David Robley                        | WEBMASTER & Mail List Admin
RESEARCH CENTRE FOR INJURY STUDIES  | http://www.nisu.flinders.edu.au/
AusEinet                            | http://auseinet.flinders.edu.au/
            Flinders University, ADELAIDE, SOUTH AUSTRALIA

-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe <email protected> For additional commands, e-mail: php-general-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>