Recursive functions for heirarchical table structure
Posted: Sat Oct 29, 2005 6:24 pm
It is my understanding that recursive functions have been removed from the newer versions of PHP, at least as it relates to a heirarchical database structure. Anybody out there have success in pulling all of the subordinate items for a given main item, such that the subordinates can be used as variables later in the code?
Example (an online store with categories as listed below):
Electronics
..Computers
....Desktops
......PC
......Mac
....Laptops
..Televisions
....CRT
....LCD
....Plasma
Is there an easy way to say "I want everything subordinate to Computers," and end up with:
Computers
Desktops
PC
Mac
Laptops?
Example (an online store with categories as listed below):
Electronics
..Computers
....Desktops
......PC
......Mac
....Laptops
..Televisions
....CRT
....LCD
....Plasma
Is there an easy way to say "I want everything subordinate to Computers," and end up with:
Computers
Desktops
PC
Mac
Laptops?