I have a mysql table which holds a list of categories and sub categories. The level of sub-categories is not limited.
What I'd like to do is display a category tree inside a select box like this for example:
Web
Servers
-- Apache
-- IIS
Web Dev
-- PHP
--- PHP & Databases
--- PHP for Windows
The mysql table structure is like this:
category_id
parent_id
category_name
Would I use a mysql query for this or let PHP sort the data ?
Help would be appreciated!