array recursion from database rows

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi.

I have a database table I have created for navigation.

The table fields are uid, parent_id, menu_name.

Each entry is either a top level element with a parent_id of 0 or a child
which has a parent_id that relates to the parent uid.

What I am trying to do is recurse through a set of rows adding the
child(ren) of a parent to a multi-dimensional array.

Does anyone know how I can do this, I've tried (unsuccessfully) to traverse
the rows to create this array but I keep failing miserably.

This is probably very easy for the people on this list so I am hoping
someone could help me out.

Thanks in advance.

Cheers.

Bob


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux