Hello,
I want to print the results of a query horizontal in colums instead of the usual rows.
'Normally':
result 1
result 2
result 3
etc.
My idea:
result 1 ¦ result 2 ¦ result 3 ¦ etc.
I thought something out like this:
<?
$sql = "SELECT * FROM access WHERE bla bla bla ";
$result = mysql_query($sql);
$number = MYSQL_NUMROWS($result);
$i = 0;
echo "<table border=2 bordercolor=red><tr><td>";
{
while ($i < $number)
$pakket = mysql_result($result, $i, pakket);
echo "<table border=1><tr><td>$pakket</td>";
if ($i == '1')
{echo "<td></td>";}
if ($i == '2')
{echo "<td></td><td></td>";}
echo "</td></tr></table>";
}
echo "</td></tr></table>";
}
?>
But that won't work. Who can help me?
Greets,
Joep