note 35104 added to function.each

From: Date: Tue, 19 Aug 2003 20:23:08 +0000
Subject: note 35104 added to function.each
Groups: php.notes 
Request: Send a blank email to php-notes+get-54713@lists.php.net to get a copy of this message
You cannot, apparently, do the following: while ($xary=each($x) && $yary=each($y)) { ... it appears that the second each, on $y, disturbs (re-each()es?) the first each, on $x. You have to do: while ($xary=each($x)) { $yary=each($y); ... ---- Manual Page -- http://www.php.net/manual/en/function.each.php Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+35104 Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+35104&report=yes Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+35104&report=yes

« previous php.notes (#54713) next »