日期:2014-05-17 浏览次数:20475 次
function arr_fun($arr){ if(is_array($arr)){ foreach($arr as $v){ if(is_array($v)){ arr_fun($v); }else{ echo $arr[id].","; break; } } }else{ echo $arr.","; } }
function arr_fun($arr){ $r = ''; if(is_array($arr)){ foreach($arr as $v){ if(is_array($v)){ $r .= arr_fun($v); }else{ $r .= $arr[id].","; break; } } }else{ $r .= $arr.","; } return $r; }