note 10597 deleted from function.next by aidan
| From: | aidan@php.net | Date: | Sat, 18 Sep 2004 04:32:39 +0000 |
| Subject: | note 10597 deleted from function.next by aidan | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-76916@lists.php.net to get a copy of this message | ||
Note Submitter: dfunct at telus dot net
----
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))