I asked a similar question earlier but I'll ask it again in a different way. How can I indent categories and endless sub categories that I have in a select drop down menu using PHP & CSS?
Here is my PHP code.
while (list($id, $parent_id, $category) = mysqli_fetch_array($r, MYSQLI_NUM)) {
// Add to the select menu:
echo '<option value="' . $id . '">' . $category . '</option>\n';
}
Here is the output.
1. Apple
2. Arts & Entertainment
1. Amusement
2. Art
3. Artists
1. A
1. a1
2. a2
2. B
3. C
4. D
3. Automotive
4. Network
5. Server
6. Web Design
1. CSS
2. HTML
The numbers are just there to see the categories and sub categories easier.