Re:How PHP's foreach works
by dools on Wednesday February 27, 2013 @08:39PM
(#5296419)
A more "hair friendly" way to modify an array from within a foreach loop is to just use the array key:
or whatever - ie. just use the key to modify the original array directly. It's much easier to read and see what's happening (in my opinion anyway).
[ Parent
| on HN ]
There are no comments on this comment yet.