Forum Moderators: open
Bit of a newbie here trying to work something out.
If you can give me direction on what to do, not necessarily code that would be a massive help.
I have a table called `categories`. Not its setup like so:
ID int(3)
category varchar(50)
parent int(3)
Now for instance I have a category called `CD` and the id will be 1.
I then have categories called `Singles` and `Albums` with IDs of 2 and 3 respectively and parent equals 1 and 1 respectively.
`categories`
ID category parent
1 CD 0
2 Singles 1
3 Albums 1
Now I want to get those out in the below format:
Categories:
CD
->Singles
->Albums
DVD
->Musical
->Comedy
I just added DVD so you can see what other categories could be added to such a table to explain how the output should be done.
Cheers for the help :)
Fatwombat.