note 84026 added to function.each

From: Date: Tue, 24 Jun 2008 17:08:44 +0000
Subject: note 84026 added to function.each
Groups: php.notes 
Request: Send a blank email to php-notes+get-140775@lists.php.net to get a copy of this message
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? ---- Server IP: 80.64.47.13 Probable Submitter: 62.57.102.149 ---- Manual Page -- http://www.php.net/manual/en/function.each.php Edit -- https://master.php.net/note/edit/84026 Del: integrated -- https://master.php.net/note/delete/84026/integrated Del: useless -- https://master.php.net/note/delete/84026/useless Del: bad code -- https://master.php.net/note/delete/84026/bad+code Del: spam -- https://master.php.net/note/delete/84026/spam Del: non-english -- https://master.php.net/note/delete/84026/non-english Del: in docs -- https://master.php.net/note/delete/84026/in+docs Del: other reasons-- https://master.php.net/note/delete/84026 Reject -- https://master.php.net/note/reject/84026 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#140775) next »