$where=array('parent_id='.$type_id);
$mySqlViewService=new MysqlViewService();
$infos=$mySqlViewService->query('mdl_article_type',array(),$where);
foreach($infos as $info){
$arrayList[]=$info;
$count=$mySqlViewService->getCounts('mdl_article_type',array('parent_id='.$info['mdl_article_type_id']));
if($count!=0)
{
$this->getTypeTree($info['mdl_article_type_id'],$arrayList);
}
}
return $arrayList;
递归为什么return了好多次啊!
$mySqlViewService=new MysqlViewService();
$infos=$mySqlViewService->query('mdl_article_type',array(),$where);
foreach($infos as $info){
$arrayList[]=$info;
$count=$mySqlViewService->getCounts('mdl_article_type',array('parent_id='.$info['mdl_article_type_id']));
if($count!=0)
{
$this->getTypeTree($info['mdl_article_type_id'],$arrayList);
}
}
return $arrayList;
递归为什么return了好多次啊!
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货