/ Published in: PHP
URL: http://codingrecipes.com/php-advancing-array-pointer-in-a-foreach-loop
Expand |
Embed | Plain Text
BUT You can work around this by replacing the ‘foreach’ with a ‘while’ loop, but before you do so, you must know that the following loops are functionally identical: foreach ($days as $day) { echo $day; } echo $day; } The same is true for these two, they are functionally identical: foreach ($days as $i => $day) { } } /* Skip white spaces */ if ($token == ' ') { } }
Comments
Subscribe to comments
You need to login to post a comment.

How about:
foreach ($tokens as &$token) {
}
used: ezpl plugin, schedule.php