当前位置:编程学习 > php >>

ecshop 无限级分类分析

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:该节点的子节点深度,也是依次进驻

       */

补充:Php教程,Php常用代码 
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,