I have a php script that I tried to write to pull info from a database. It works well. However I have over 30,000 rows and only 5 categories. I want the script to list each category once. It is listing the category for each row. So I'm getting 30,000 lines instead of 5. I attached the current script.