I have a category table, which supports unlimited subcategory depth, basically the table looks like this :
TABLE NAME : CATEGORIES
ID, TITLE, CATEGORY
So a sub-category has the ID number of it's parent in the CATEGORY field.
A top level category has an empty CATEGORY field...
Works great, but I am not sure how to output these categories orderly, under thier parents..
IE
Accommodations
---------->Hotels
---------->Hotels---------->Under $100
---------->Hotels---------->Under $200
---------->Motels
---------->Motels---------->Under $100
---------->Motels---------->Under $200
---------->Motels---------->Under $100---------->Moter Inns
---------->Motels---------->Under $100---------->Etc
Resturaunts
..... etc...
So a recursive function I guess... would be needed, if anyone has a good link or an example, It'd be appreciated!
-Arron