/ Published in: PHP
Expand |
Embed | Plain Text
// Recursively traverses a multi-dimensional array. function traverseArray($array) { // Loops through each element. If element again is array, function is recalled. If not, result is echoed. foreach($array as $key=>$value) { { traverseArray($value); }else{ } } }
Comments
Subscribe to comments
You need to login to post a comment.

Title should be Recursively
Thanks for catching that. Changed it.