This might be easier if I show what I am getting and what I need...
What I am getting:
Here is what I need:
Here is the code. I have tried several variations to no avail.
What I am getting:
Code:
Title 1 ,12
Title 1 ,15
Title 1 ,19
Title 2 ,20
Title 2 ,23
Title 2 ,28
Title 3 ,3
Title 3 ,7
Here is what I need:
Code:
Title 1 ,12, 15, 19
Title 2 ,20, 23, 28
Title 3 ,3, 7
Here is the code. I have tried several variations to no avail.
Code:
$dataname = 'Playlist'.$_POST['report'].$_POST['year'].$_POST['month'];
$query = odbc_exec($odbc, "SELECT * FROM $dataname WHERE runtime > '00:30:00'order by title, day, block");
$content="
<table width=98% cellpadding=5 cellspacing=0 border=0><tr><td class=\"txt\">";
while ($row = odbc_fetch_array($query))
{
$title = str_replace("'","''",$row['title']);
$playtime = $row['day'];
$content .= $title." ,".$playtime.'<br>';
}
// CLEANUP
odbc_close($odbc);
$content .= "</td></tr></table>";
$body = str_replace("#content#", $content, $body);
echo $body;