Re: dynamic table

From: Date: Wed, 26 May 2004 14:10:10 +0000
Subject: Re: dynamic table
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-186991@lists.php.net to get a copy of this message
$i = 0; while ($myrow = mysql_fetch_array($sql)) { if (++$i % 5 == 0) echo '<tr>'; ... Note: if used repeatedly do not increment the $i again in the loop. HTH Richard -----Original Message----- From: nabil Sent: Wednesday, May 26, 2004, 2:28:28 PM > Hiya, > How can i draw a new <tr> AFTER FIVE <td> in the following loop > (i want to echo the records in 5 columns width tables whatever the number of > records will be fetched) > .. > echo '<table>'; > while ($myrow = mysql_fetch_array($sql)) > { > echo $myrow[0]; > } > echo '</table>'; > regards

« previous php.general (#186991) next »