$result = mysql_query("$sql");
$row[] = mysql_fetch_array($result);
then echo them into a predifined template using the keys 0,1 and 2
$row['col1']['0']
$row['col1']['1']
$row['col1']['2']
$row['col2']['0']
$row['col2']['1']
$row['col2']['2']
$row['col3']['0']
$row['col3']['1']
$row['col3']['2']
$row['col4']['0']
$row['col4']['1']
$row['col4']['2']
$row['col5']['0']
$row['col5']['1']
$row['col5']['2']
This is pure guesswork so don't shoot me if it don't work 😉
Better explanation of your problem may help us to help you!