php面包屑导航
2017-03-27 10:42
134 查看
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】如何通过php程序快速构造一个面包屑导航
- php可应用于面包屑导航的递归寻找家谱树实现方法
- 黄聪:Discuz X2.0 SEO:论坛面包屑导航伪静态 去掉面包屑导航forum.php(转)
- php可应用于面包屑导航的递归寻找家谱树实现方法
- php实现面包屑导航例子分享
- php实现面包屑导航例子分享
- php可应用于面包屑导航的迭代寻找家谱树实现方法
- [php] 面包屑导航2
- php利用url实现面包屑导航
- PHP实现面包屑导航
- php可应用于面包屑导航的迭代寻找家谱树实现方法
- [php] 面包屑导航
- php实现面包屑导航
- wordpress面包屑导航
- 交互设计:用面包屑来简化多层的Tabs导航
- 站内优化:面包屑导航
- 黄聪:WordPress 3.0 后台导航菜单找不到,如何调用出来? (修改function.php文件即可实现)
- 设置zencart当前页面位置导航(zencart面包屑)
- Magento - 为购物车页面添加面包屑导航(breadcrumb)
- AMFPhp与Flash||Flex 的交互后——台技术区分类导航