note 61935 deleted from control-structures.foreach by danbrown
| From: | danbrown@php.net | Date: | Tue, 15 Mar 2011 13:45:03 +0000 |
| Subject: | note 61935 deleted from control-structures.foreach by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-177891@lists.php.net to get a copy of this message | ||
Note Submitter: Edwin_fromUtrecht at NOSPAM dot example dot com
----
To comment on the foreach statement behaviour comment below: The reason for this different behaviour
is that the foreach statement is equivalent to the each statement. They both make use of an internal
pointer. To loop through the complete array after a change you could use the reset statement on the
array.