Created
September 1, 2019 03:51
-
-
Save heinthanth/5142b2fd9326e8d893eb0c78682a591f to your computer and use it in GitHub Desktop.
For Each
This file contains hidden or 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
<?php | |
$x = [4, 5, 6, 7, 8]; | |
foreach($x as $i) { | |
echo $i; | |
// will print 4, 5, 6, 7, 8 in each time since $i = $x[$i] in each time | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment