thinkphp显示二级菜单 xiaoming 2023-01-19 134 0 $class=M("Class"); $data=$class->select(); $list=array(); foreach($data as $arr){ $list[$arr[parentid]][]=$arr;//重新整理数据排序。 } $this->assign("list",$list);