求高手指点,foreach遍历三维数组时只能遍历出第一个子级,这是为什么呢?
$val){
?>" style="cursor: pointer;"> =$val['id']?> onclick="task(=$val['id']?>,'=$val['name']?>')">=Util::msubstr($val['name'],0,16,'gbk')?> =date("Y-m-d ",strtotime($val['date_start']))?> =$val['plan_director_name']?> %; height:6px; background:#23bd00;">
&workcenter_id==$val['workcenter_id']?>&plan_id==$val['id']?>'" id="show">
查看
$countParent=$key+1+$count;$child=0;
if(is_array($val[$key]))foreach($val[$key] as $v){ //这里只执行了一次
if($val['id']==$v['parent_id']){
$count=$count+1;$child=$child+1;
?>treegrid-parent-=$countParent?>"> =$v['id']?> =Util::msubstr($val['name'],0,16,'gbk')?> =1?> =date("Y-m-d ",strtotime($v['date_start']))?> =$val['plan_director_name']?> %; height:6px; background:#23bd00;">=$v['status']?>
}
}
}}?>
已抢23397个
抢已抢117836个
抢已抢139277个
抢已抢6240个
抢已抢35863个
抢已抢66595个
抢