The code below selects all of the categories in my database, counts how many products are available for each category, and echoes the results in a single column, in an order which I control with a database table column called catorder. Here's how the results look:
All Apparel (6)
Children's Apparel (2)
Men's Apparel (2)
Women's Apparel (2)
All Health and Beauty (15)
Accessories (5)
Cosmetics (5)
Fragrances (5)
I would like to display these results differently. I want to:
1) separate related groups of categories and cap them with a heading, like this:
Apparel
All Apparel (6)
Children's Apparel (2)
Men's Apparel (2)
Women's Apparel (2)
Health and Beauty
All Health and Beauty (15)
Accessories (5)
Cosmetics (5)
Fragrances (5)
2) And I want the results to be displayed in a table with two columns.
Can anyone help, please? I don't know how to do this at all.