Best Way to get the category subcategory listing
Posted: Mon Nov 22, 2010 12:29 am
Best Way to get the category subcategory listing that can have n level relation.

like if there is category like
a->b->c->d
->e->f->g
->h
->i->j->k
->l
Where a is main category and rest are subcategories. this reletion is comming from database.
id name parent
1 a 0
2 b 1
3 e 1
4 i 1
5 c 2
6 f 3
7 h 3
8 j 4
9 d 5
10 g 6
11 k 4
12 l 4
I have to show this relation in a drop down in a very descriptive way so as a user comes to know parent child relation from this so that if he/she wants to add a subcategory under any level he can add it easily.
hey my explanation is not too good so please try to understand what i want to say.
like if there is category like
a->b->c->d
->e->f->g
->h
->i->j->k
->l
Where a is main category and rest are subcategories. this reletion is comming from database.
id name parent
1 a 0
2 b 1
3 e 1
4 i 1
5 c 2
6 f 3
7 h 3
8 j 4
9 d 5
10 g 6
11 k 4
12 l 4
I have to show this relation in a drop down in a very descriptive way so as a user comes to know parent child relation from this so that if he/she wants to add a subcategory under any level he can add it easily.
hey my explanation is not too good so please try to understand what i want to say.