I'm trying to find out how to develop a script in php to generate a menu for me. I want the menu to have top level categories and then sub-categories... something like this:
Category 1
- Subcategory 1 under Category 1
- Subcategory 2 under Category 1
- Subcategory 3 under Category 1
Category 2
- Subcategory 1 under Category 2
- Subcategory 2 under Category 2
- Subcategory 3 under Category 2
And then as they add a top level category, it gets added to the menu automatically and if they add a subcategory to the top level, it gets added automatically and so on.
I'll be using MySQL to store the values. I'm looking for the script that can do this and then I can customize it to my needs. No javascript wanted. I just want php to output the HTML code.
Thanks!
Category 1
- Subcategory 1 under Category 1
- Subcategory 2 under Category 1
- Subcategory 3 under Category 1
Category 2
- Subcategory 1 under Category 2
- Subcategory 2 under Category 2
- Subcategory 3 under Category 2
And then as they add a top level category, it gets added to the menu automatically and if they add a subcategory to the top level, it gets added automatically and so on.
I'll be using MySQL to store the values. I'm looking for the script that can do this and then I can customize it to my needs. No javascript wanted. I just want php to output the HTML code.
Thanks!