Hey Psy, thanks for the really quick reply. I get what you mean and you're correct, that's exactly what I need. I'm trying to write it in a different way though - I don't know why this won't output a multi-row table:
echo '<table>';
echo '<tr>';
while($row = mysql_fetch_assoc($result))
{
if($lastrow = $row['row'])
{
echo '<td>'.$row['id'].'-'.$lastrow.$row['col'].'</td>';
} else {
echo '</tr><tr>';
}
$lastrow = $row['row'];
}
echo '</table>';
I thought that the '$lastrow = $row['row'];' line would help identify the change in the value of 'row'. Might you know what's wrong?
Thanks!