php category, sub category tree

前端 未结 3 1419
别跟我提以往
别跟我提以往 2021-01-23 10:29

I\'ve done this before in long complicated statements but I\'m trying to clean up some code.

I have the following table structures

parent_categories              


        
3条回答
  •  感情败类
    2021-01-23 11:08

    The result of INNER JOIN is:

    Parent Cat 1 subcategory 1
    Parent Cat 1 subcategory 2
    Parent Cat 2 subcategory 3
    

    If you want format them as array in array use php

提交回复
热议问题