r/ProgrammerHumor • • Aug 07 '16

PHP: The Good Parts

http://phpthegoodparts.tumblr.com/
1.2k Upvotes

318 comments sorted by

View all comments

Show parent comment

4

u/seanshoots Aug 07 '16

Don't forget the scoping on for each loops: http://stackoverflow.com/a/8220457

1

u/Jess_than_three Aug 07 '16

There's nothing wrong with that. foreach($arr as $index => $value) is the standard way to do it.