Output Join Statement to Table
$result = 'Some Query'
print '<table><thead><tr><th>COlumn Title</th><th>Column Title</th></tr></thead>';
print '<tbody>';
// now loop through your query results and put stuff into the table
// of course you can monkey around with the table format and what goes in each cell
foreach($result as $row) {
print '<tr><td>'.$row->column_name.'</td><td>'.$row->column_name.'</td></tr>';
}
print '</tbody></table>';