//公共函数 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; }
递归无限极分类
猜你喜欢
转载自blog.csdn.net/qq_41610686/article/details/84428520
今日推荐
周排行