echo '<table>'; echo '<tr>'; while ($myrow = mysql_fetch_array($sql)) { echo '<td>'; echo $myrow[0]; echo '</td>'; } echo '</tr>'; echo '</table>';
You did say you wanted 5 COLUMNS, not rows, in your table... right? "nabil" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > 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 > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > > > ----- Original Message ----- From: "nabil" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, May 26, 2004 8:28 AM Subject: [PHP] dynamic table > 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 > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php