Hello,
I have a question about displaying a table in a recursive way. Not shure if I express my self corectly so sorry for that and for my bad english, but I hope you will understand
for example I have the folloeing table:
[table]
id int(5) auto_increment
category_name varchar(15)
parent_id int(5)
and this is tha data it contains
1 | Top category | 0
2 | Cars | 1
3 | Old cars | 2
4 | New cars | 2
5 | Computers | 1
6 | Used computers | 5
7 | Used Monitors | 6
This should be displayed like this in html
Cars
> Old cars
> New cars
Computers
> Used Computers
>> Used monitors
Any ideeas how could I do that?
Thx
display child filed
Moderator: General Moderators
Look at these pages
how to create the array in which you' ll put the categories and subcategories
http://www.phpwebcommerce.com/source/li ... ctions.php
how to display them on the page
http://www.phpwebcommerce.com/shop-browse-category.php
Good luck!
how to create the array in which you' ll put the categories and subcategories
http://www.phpwebcommerce.com/source/li ... ctions.php
how to display them on the page
http://www.phpwebcommerce.com/shop-browse-category.php
Good luck!
- Think Pink
- Forum Contributor
- Posts: 106
- Joined: Mon Aug 02, 2004 3:29 pm