Get unique values of SQL table and echo with PHP

database, mysql, php, sql

Solution

Use `DISTINCT`

SELECT DISTINCT `date` FROM `tablename`....

Problem

I have a MySQL table with over 200 values. One of the columns on my table is 'date'. Out of all 200 values there are only 5 unique dates. How can I list out the unique values of the dates and echo them with php. e.g. not getting back 200 instances of dates but just 5.

Original source