Hierarchies
| From: | MindHunter | Date: | Wed, 28 Nov 2001 07:27:17 +0000 |
| Subject: | Hierarchies | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-75852@lists.php.net to get a copy of this message | ||
Hi,
I need to display hierarchies (hierarchical structures). I have a MYSQL
table with data like this:
Node,Parent
A,
B,A
C,A
D,B
E,B
F,D
G,A
It can go down to 10 levels.
I do not want display one level and then click to display the next, I want
to see the entire tree at once, say like this:
A
---B
------D
---------F
------E
---C
---G
Any ideas, scripts on how I can do this? I seems like I have to use a
recursive function and /or arrays?
Any help will be appreciated!
Thanks
MH