标签:php array style stat res get tree color 分类
<?php function getTree($list,$pid=0,$level=0){ static $result=array(); foreach($list as $value){ if($value[‘pid‘]==$pid){ $result[]=$value; getTree($list,$value[‘id‘],$level+1); } } return $result; }
标签:php array style stat res get tree color 分类
原文地址:http://www.cnblogs.com/mengor/p/7823463.html