Hi,
I need to loop the records in three colum. e.g. i run a query and get 10 records (they may be more or less than 10) now i want to show these records in a table that contain three coulmn so first three records in one row and second three in second row and so on ... here if i run a loop they will be print in one row or in one column like
record1 record2 record3............
OR
record1
record2
record3
.
.
.
.
<table>
<tr>
<?
$result=mysql_query("select * from category order by catName asc ");
while( $row = mysql_fetch_array( $result ) )
{
if( mysql_num_rows($result) > 0 )
{
?>
<td><?=$row["catName"];?></td>
<?
}
}
?>
</tr>
</table>
so what i do here if i want to show these record in three coloum table.