PDA

View Full Version : 3 level drop down dynamic menu


bornholm
06-09-2008, 08:50 AM
Hi.

I am struggling with something I never thought would be an issue.

I'm trying to develop a 3 level drop down menu in as3 and I am connected to a database where all the menu items are stored. I am getting the stored data with the help of amfphp.

I naively assumed I could just run the data I got from the database in some for loops and have the following structure:

Topmenu1
Submenu1
Submenu2
SubSubmenu1
SubSubmenu2
Topmenu2
Submenu1
Submenu2

Etc.

The top menus have a parent_id = 0. The submenus have parent_id = its parents id and so on.

Could anyone please help me out of this pickle?

Cordially
Vayu