Sort list into groups & break between different groups
Posted: Tue Mar 15, 2005 8:53 am
I have a list of links in MySQL, as ID, category, Description & URL,
Q. How can i generate a list in PHP which breaks the list down by category & which enters the category as the header. i.e.
LINKS
Search Pages
Google.com
MSN.com
PHP Sites
devnetwork.com
PHP.net
etc.
I only have around 4 categories so could easily have 4 connections on my page (where category = 1, 2, 3 or 4) & list them that way.
Is this the easiest way to do it? what if i have 40 categories???
Q. How can i generate a list in PHP which breaks the list down by category & which enters the category as the header. i.e.
LINKS
Search Pages
Google.com
MSN.com
PHP Sites
devnetwork.com
PHP.net
etc.
I only have around 4 categories so could easily have 4 connections on my page (where category = 1, 2, 3 or 4) & list them that way.
Is this the easiest way to do it? what if i have 40 categories???