note 84026 rejected from function.each by danbrown
| From: | danbrown@php.net | Date: | Tue, 24 Jun 2008 17:39:46 +0000 |
| Subject: | note 84026 rejected from function.each by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-140776@lists.php.net to get a copy of this message | ||
Note Submitter: Anonymous
----
If the "caution" message is true, then why this code don't reset the array pointer?
<?
$fruit = array('a' => 'apple', 'b' => 'banana',
'c' => 'cranberry');
echo current($fruit)."\n";
next($fruit);
echo current($fruit)."\n";
$array=$fruit;
echo current($fruit)."\n";
?>
Another php bug as feature?