note 91603 deleted from control-structures.foreach by thiago
| From: | thiago@php.net | Date: | Fri, 19 Jun 2009 01:25:12 +0000 |
| Subject: | note 91603 deleted from control-structures.foreach by thiago | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-157109@lists.php.net to get a copy of this message | ||
Note Submitter: anon at manhattaninteractive dot com
Reason: integrated
----
Note that:
foreach($array as $value){
if($result=='problem'){
prev($array);
}
}
wont work. if you need to rewind the pointer in a foreach loop for some reason use the alternate:
while (list(, $value) = each($array)) {
if($result=='problem'){
prev($array);
}
}