$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(); }
posted on 2017-01-13 20:50 阅读( ...) 评论( ...)
本文共 266 字,大约阅读时间需要 1 分钟。
$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(); }
转载于:https://www.cnblogs.com/phpben/p/6284098.html