$arr/多维不规则数组
function forarr($m){ foreach ($m as $v) { if (is_array($v)) { forarr($v);//递归 } else { echo $v ." "; } } } $how=forarr($arr1); echo $how;