// 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)
{
if(is_array($value))
{
traverseArray($value);
}else{
echo $key." = ".$value."<br />\n";
}
}
}