$list=D(‘category‘)->where(‘cat_fid=0‘)->select();foreach ($list as $k=>$value){ $list[$k][‘list‘]=M(‘category‘)->where(‘cat_fid=‘.$value[‘cat_id‘])->select();}
简单的二级目录 操作
原文:http://www.cnblogs.com/phpben/p/6284098.html