note 41622 added to function.next

From: Date: Sat, 17 Apr 2004 01:49:15 +0000
Subject: note 41622 added to function.next
Groups: php.notes 
Request: Send a blank email to php-notes+get-68229@lists.php.net to get a copy of this message
Take care when replacing code using reset()/next() with code using foreach as foreach does not update the array's internal pointer. This means you cannot, say, use next() to skip an element in foreach loop, or use current() within a function to get a reference to the current element. You probably have code depending on this internal pointer and replacing it will be more work than you anticipated. See http://www.php.net/foreach ---- Manual Page -- http://www.php.net/manual/en/function.next.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+41622 Delete -- http://master.php.net/manage/user-notes.php?action=delete+41622&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+41622&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#68229) next »