Hey guys, I have a minor aesthetics problem that is driving me nuts. I have a table in a database that is structured as follows:
categories
id
name
description
parent_id
date
I have a dropdown that is pulling all these value dynamically, and here is my problem. Some of the categories are sub-categories, and I would like for them to display after their parent category. However, right now it just pulls everything as it shows up int he database. How do I display the list as I would like it?
Example ([id:1]Cars->[id:5]Honda) shows up on the list as:
Cars
-Honda
instead of:
Cars
something
something
something
-Honda