function findChild(&$arr,$id) 
{ 
   $childs=array(); 
   foreach ($arr as $k => $v) 
   { 
        if($v['parent_id']== $id) 
        { 
             $childs[]=$v; 
        } 
   } 
   return $childs; 
} 

posted on 2013-12-30 15:25  大海航手  阅读(206)  评论(0编辑  收藏  举报