Created
October 14, 2014 11:45
-
-
Save 0xPr0xy/80a6f00a4c1416ff1f5b to your computer and use it in GitHub Desktop.
foreach.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$a = array ('zero','one','two', 'three'); | |
foreach ($a as &$v) { | |
} | |
foreach ($a as $v) { | |
echo $v.PHP_EOL; | |
} | |
// Can somebody explain why the output is: zero one two two . |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment