產生無限分類的結構
public function get_tree_1(array $list = array())
{
$root = array();
$node = array();
foreach ($list as $>>; $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];
}
}
回傳$root;
}