View Single Post
Old 12-29-2012, 09:04 PM   PM User | #10
Fou-Lu
God Emperor


 
Fou-Lu's Avatar
 
Join Date: Sep 2002
Location: Saskatoon, Saskatchewan
Posts: 15,658
Thanks: 4
Thanked 2,451 Times in 2,420 Posts
Fou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to all
Oh yay I hate writing recursive arrays as trees.
You *can* also let the function completely flatten the dataset of the $menu array if desired. Ultimately if I do a tree with arrays in PHP, I'd have two functions anyway, the first one would build the correct nesting level for the items, and the second to display it (both accept the same dataset). That is similarish to what you've done here with the two items in the $menu pulled from the fetch.
Fou-Lu is offline   Reply With Quote