I have a table like this:
+----+-------+--------+
| id | title | parent |
+----+-------+--------+
| 1  | text1 |  NULL  |
+----+-------+--------+
| 2  | text2 |  NULL  |
+----+-------+--------+
| 3  | text3 |  NULL  |
+----+-------+--------+
| 4  | text4 |   1    |
+----+-------+--------+
| 5  | text5 |   1    |
+----+-------+--------+
| 6  | text6 |   2    |
+----+-------+--------+
| 7  | text7 |   3    |
+----+-------+--------+
| 8  | text8 |   5    |
+----+-------+--------+
"parent" is foreign key to "id" and I want to list these rows in html.
the list should be like this:
• text1
    ○ text4
    ○ text5
        ♦ text8
• text2
    ○ text6
• text3
    ○ text7
I need the sql_code and php.
thanks...
 
     
    