生成无限分类的结构
public function get_tree_1(array $list = array())
{
$root = array();
$node = array();
foreach ($list as $k => $v) {
list($id, $pid, $name, $path) = array_values($v);
$node[$id] = $v;
if(isset($node[$pid])) {
$node[$pid]['child'][$id] = &$node[$id];
}
if($pid == 0) {
$root[$id] = &$node[$id];
}
}
return $root;
}
已抢47604个
抢已抢3083个
抢已抢1094个
抢已抢1143个
抢已抢758个
抢已抢1440个
抢