public function getFamily($cat_id){//获取面包屑导航 $tree=array(); $cats=$this->cats; while($cat_id>0){ foreach($cats as $v){ if($v['cat_id']==$cat_id){ $tree[]=$v; $cat_id=$v['parent_id']; } } } return array_reverse($tree); } public function family($parent_id){//php更改family $trees=$this->getFamily($parent_id); $flag=true; foreach($trees as $v){ if($v['cat_id']==I('get.cat_id')){ $flag=false; } } return $flag; } }
php面包屑导航
最新推荐文章于 2022-08-27 10:43:08 发布