Created
September 5, 2020 23:30
-
-
Save csilverman/c4c93c353eb1cfb8d841fabc01177193 to your computer and use it in GitHub Desktop.
Iterate over arrays
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 | |
foreach ($array as &$item) { | |
// code | |
} | |
unset($item); | |
foreach ($array as $key => $value) { | |
// code | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment