首页  >  文章  >  php教程  >  ecshop 无限级分类分析

ecshop 无限级分类分析

WBOY
WBOY原创
2016-06-08 17:29:32966浏览
<script>ec(2);</script>

function cat_options($spec_cat_id$arr)

{

    static 
$cat_options = array();

    if (isset(
$cat_options[$spec_cat_id]))

    {

        return 
$cat_options[$spec_cat_id];

    }

    if (!isset(
$cat_options[0]))

    {

       
/*

        初始化关键参数:

        $level:当前子节点深度

        $last_cat_id:当前父节点ID

        $options:带有缩进级别的数组

        $cat_id_array:沿同一路径的父节点依次进驻

        $level_array:该节点的子节点深度,也是依次进驻

       */

声明:
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn