I developed thinkphp with a navigation solution. products and services are classified as Level 1, while environmental protection is classified as Level 2. The list of articles under Level 2 categories. I use recursive multi-dimensional arrays to loop the first-level and second-level categories in two cycles. The question now is how to obtain the second-level score...
I developed thinkphp with a navigation solution. products and services are classified as Level 1, while environmental protection is classified as Level 2. The list of articles under Level 2 categories.
I use recursive multi-dimensional arrays to loop the first-level and second-level categories in two cycles. The question now is how to obtain the list of articles under the secondary classification?
Use Admin \ Model \ Category; $ cate = M ('cate')-> order ('sort ')-> select (); import ("Admin. model. category "); $ cate = Category: unlimitedForLayer ($ cate); // multi-dimensional array read infinitus Category
- {$ V. name}
{$ Value. name}
Reply content:
I developed thinkphp with a navigation solution. products and services are classified as Level 1, while environmental protection is classified as Level 2. The list of articles under Level 2 categories.
I use recursive multi-dimensional arrays to loop the first-level and second-level categories in two cycles. The question now is how to obtain the list of articles under the secondary classification?
Use Admin \ Model \ Category; $ cate = M ('cate')-> order ('sort ')-> select (); import ("Admin. model. category "); $ cate = Category: unlimitedForLayer ($ cate); // multi-dimensional array read infinitus Category
- {$ V. name}
{$ Value. name}
In php, query the corresponding article data based on the List ID again!