日期:2014-05-17 浏览次数:20463 次
public function accountTreeType1($arrData){
$this->strLable = $this->strLable.'<ul>';
foreach($arrData as $val){
if(is_array($val['child'])){
$this->strLable = $this->strLable.'<li>'.$val['acc_code'].$val['acc_name'];
$this->accountTreeType1($val['child']);
}else{
$this->strLable = $this->strLable.'<li>'.$val['acc_code'].$val['acc_name'].'</li>';
if($val[id]=='最后一个ID'){
return $this->strLable; //在这里没有返回值,不过用echo $this->strLable;是可以打印出来,但是返回值为空。
}
}
}
$this->strLable = $this->strLable.'</ul>';
}