Hi
I want to display results which are retrieved from the database in the following format:
1 2 3
4 5 6
7 8 9
........
.......
.....
based on the mysql_row_count() dividing the results into 3 columns and n rows.
$result1 = mysql_query("SELECT * FROM table2");
$row = mysql_fetch_array( $result1 );
for ($i = 0; $i < mysql_num_rows($result1); ++$i)
{
$row = mysql_fetch_row($result1);
echo '<table cellspacing="9"><tr><td>'.$row[i].'</td><td>'.$row[i+1].'</td><td>'.$row[i+2].'</td></tr></table>
<br/><br/>
';
}
I have beeeen trying but couldnt get any nearer to it..
Thanks.