//公共函数 function _getchildren($data,$pid = 0,$level = 0) { static $tree = array(); foreach($data as $vo){ if($vo['parent_id'] == $pid){ $vo['level'] = $level; $tree[] = $vo; $this->_getChildren($data,$vo['ID'],$level+ 1); } } return $tree; }
递归无限极分类
最新推荐文章于 2024-05-14 15:37:54 发布