note 101389 rejected from function.current by salathe
| From: | salathe@php.net | Date: | Tue, 14 Dec 2010 11:20:04 +0000 |
| Subject: | note 101389 rejected from function.current by salathe | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-174900@lists.php.net to get a copy of this message | ||
Note Submitter: IMSoP
----
In reply to Daniel Alvarez Arribas:
While it's not exactly equivalent to the function you wrote here, the task you want to solve
(return the current value, then move the pointer forward) is the purpose of the each() function.
If you're not interested in the keys of the array, you can use the list() operator with a
missing first argument:
<?php
list( , $value ) = each( $array );
?>