摘要:
数据表结构: 函数: function tree($arr, $pid = 0, $level = 1){ static $arr2 = []; foreach($arr as $v){ if($v['parent_id'] == $pid){ $v['level'] = $level; $arr2 阅读全文
摘要:
数据表结构 函数: function make_tree($list,$pk='id',$pid='pid',$child='_child',$root=0){ $tree=array(); $packData=array(); //转换数组的结构 foreach ($list as $data) 阅读全文