First of all, I'm new to this level of PHP, so my apologies!

My goal is to create an HTML table that lists the title, type, size, and date of a document sorted by the project to which the document belongs. Like this:



I can get the data out of MYSQL with

Code:
$q = 'SELECT DISTINCT project_name, document_name, document_type, 

document_size, date_last_modified FROM documents LEFT
...