delamatrix Posted October 21, 2008 Share Posted October 21, 2008 Hi guys, I'm working on some code that pull some records from a test db. I actually got the records to display 4 cells across in a html table, but I can't get the fifth record and so to start on a new row. The code is below: ...snip... <table border="1"> </tr> <?$i=0; while ($i < $num && $i < $limit) { $name=mysql_result($result,$i,"name"); $age=mysql_result($result,$i,"age"); ?> <td> <? echo $name; ?> <? echo $age; ?></td> <? $i++; } echo "</tr>"; ?> </table> Any help would be greatly appreciated. Thanks in advance. -Delamatrix Quote Link to comment https://forums.phpfreaks.com/topic/129491-format-mysql-results-with-php/ Share on other sites More sharing options...
AndyB Posted October 22, 2008 Share Posted October 22, 2008 http://www.phpfreaks.com/forums/index.php/topic,95426.0.html Quote Link to comment https://forums.phpfreaks.com/topic/129491-format-mysql-results-with-php/#findComment-671355 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.