note 10597 added to next

From: Date: Fri, 12 Jan 2001 00:41:36 +0000
Subject: note 10597 added to next
Groups: php.notes 
Request: Send a blank email to php-notes+get-9677@lists.php.net to get a copy of this message
Don't try this and expect it to work: while(next($array)) the loop will never begin on the first item in the array since next() advances the pointer BEFORE returning the values. Instead use something like this: while(list($i) = each($array)) http://www.php.net/manual/function.next.php

« previous php.notes (#9677) next »