php如何遍历一个复杂的多维数组
<?php
function doSomething($value)
{
echo $value."<br />";
}
function look(array $array)
{
foreach ($array as $value)
{
if(is_array($value))
look($value);
else
call_user_func("doSomething",$value);
}
}
$arr=array(
array(array('val1','val2','val3'),'aa','bb'),
'php',
'apache',
array('hello','world')
);
look($arr);