/ Published in: PHP

Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
// 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{ echo $key." = ".$value."<br />\n"; } } }
Comments
