recursive function to get all the child categories

后端 未结 7 867
时光取名叫无心
时光取名叫无心 2020-12-03 03:54

Here is what I\'m trying to do: - i need a function that when passed as an argument an ID (for a category of things) will provide all the subcategories and the sub-sub categ

7条回答
  •  难免孤独
    2020-12-03 04:34

    database tree to multidimensional array

     $row["Title"],
           "Children" => getTree($row["id"])
         );
       }
       return $arr;
    }
    ?>
    

提交回复
热议问题