Thanks, sijis.
I total understand the idea. Also I have already the table created,
+-----------+----------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+-----------+----------+------+-----+---------+----------------+
| cat_id | int(11) | | PRI | NULL | auto_increment |
| parent_id | int(11) | | | 0 | |
| cat_name | tinytext | | | | |
+-----------+----------+------+-----+---------+----------------+
The only thing I am confused is how do you set up a PHP script to automatically retrieve the categories structure from the table to show something liek that below, i.e.,
Main category 1
|Sub-category 1
|Sub-category 2
| Sub-sub-category 1
| Sub-sub-sub-category 1
|...
Main category 2
|Sub-category 1
|Sub-category 2
| Sub-sub-category 1
|_...
Main category 3
...
Thanks again.