hi to all
i have script that generate output in table format but the output is in column type arrange how can i do that in row type arrange
the current output was
<table>
<tr>
<Td> one </td>
<td>two</td>
</tr>
<tr>
<Td> three </td>
<td>four</td>
</tr>
but suppose to be
[CODE]
<table>
<tr>
<Td> one </td>
<td>three</td>
</tr>
<tr>
<Td> two </td>
<td>four</td>
</tr>
[/CODE]
Any ideas?
my current code
$sql=mysq_query($str);
$ctr=0;
echo '<table>';
while ($r=myql_fetch_object($sql))
{
$ctr++;
if ($ctr % 2) ==0 echo "</tr><tr>";
echo "<Td>".$r->name."</td>";
}
echo '</table>';