I am using the following mysql query to group my results for my car database in mysql and php and output to my page
$query = "SELECT make, model, count(model) AS cnt FROM cars WHERE make= '$make' GROUP BY make,model
When I output this to the page I get the following results
Ford
Mondeo(2)
Ford
Focus(1)
Ford
Ka(3)
Vauxhall
Vectra(3)
Vauxhall
Corsa(4)
I am seriously scratching my head here. I want the page to output the results the following way so that the make is grouped and the models are displayed underneath.
Ford
Mondeo(2), Focus(1), Ka(3)
Vauxhall
Vectra(3), Corsa(4)
I have tried so many combinations with the mysql query that I have now hit a brick wall and would appreciate some further advice.