How simple should this be!!
I have a table containing information, and each bit of information belongs to a catagory which is named using the imaginativley named field 'catagory'. All I want to do is count up how many bits of information a belong to each catagory and display the results as a simple list eg:
igloo plans: 23
moose blueprints: 34
pudding: 44
tulips: 22
etc etc.
the way I am currently doing it is calling up all records and within a " while($row = mysql_fetch_array($result)){ " I am sticking lots of " if " statements which add 1 to a variable being used as a counter . It works but its long and messy and I rememebr reading a much simpler way of doing it, simply cant remember how and am having an off day with the search engines...
any advice much appreciated :p
m.