array_walk, is similar to
foreach, as it iterates through each element in the given array. However, unlike
foreach, it does not affect the array’s internal pointer and the element’s key/value pair are passed to a callback for processing.
- The array to loop through and pass each element’s key/value pair to the callback.
- The callable to be called (invoked) for each element within the array. It will take two parameters: (1) the element’s value as the first parameter, and (2) the key/index as the second parameter.
- optional If you want to pass a third parameter to the callback, you use the
TRUE if it successfully walks through the array; else you will get a
FALSE back from it.
When was the last time you got out of your chair and stretched? Just saying…
More coming soon…keep checking back.