Heim  >  Artikel  >  php教程  >  ecshop 无限级分类分析

ecshop 无限级分类分析

WBOY
WBOYOriginal
2016-06-08 17:29:32962Durchsuche
<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:该节点的子节点深度,也是依次进驻

       */

Stellungnahme:
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn