03 2013 档案

摘要:对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]; } /* 初始化关键参数: $level:当前子节点深度 $last_cat_id:当前父节点ID $options:带有缩进级别的数组 $cat_id_array:沿同一路径的父节点依次进驻 $l 阅读全文
posted @ 2013-03-26 10:10 徐耀湘 阅读(181) 评论(0) 推荐(0) 编辑