On Jun 4, 2003 at 17:35, Richard Unitek wrote:
I want to build a multi level tree system using php and database like mysql. e.g./
1 / | \ / | \ 2 3 4
simple tree structure with 3 Childs and so on.
You need a data structure called a tree (surprise!). You could have a struct like this:
struct foo { nodedata; struct foo **children; /* list of pointers */ }
In perl, you'd have an anonymous array instead of the struct **.