Aug 23, 2001 #1 eter4 MIS Mar 13, 2001 30 CA Does anyone know of a good " IDIOTPROOF " script or example of how to make a PHP script display the results of a query in a table..??? Thanks
Does anyone know of a good " IDIOTPROOF " script or example of how to make a PHP script display the results of a query in a table..??? Thanks
Aug 24, 2001 #2 mcvdmvs Technical User Sep 18, 2000 172 NL u have to make an for loop: $rows = mysql_num_rows($result); <table> for($i = 0; $i < $rows; $i++) { echo "<tr>"; echo "<td></td>"; echo "</tr>; } </table> more difficult is ending lines when data has reached a certain value. If u want that ill post it tomorrow. mcvdmvs mick@nederland.net http://www.wezine.net, http://www.vandermostvanspijk.nl, http://geentijd.nu knows: html, JavaScript, dhtml, css, php, mysql, postgresql, xml, linux to learn: java, c++, perl, python Upvote 0 Downvote
u have to make an for loop: $rows = mysql_num_rows($result); <table> for($i = 0; $i < $rows; $i++) { echo "<tr>"; echo "<td></td>"; echo "</tr>; } </table> more difficult is ending lines when data has reached a certain value. If u want that ill post it tomorrow. mcvdmvs mick@nederland.net http://www.wezine.net, http://www.vandermostvanspijk.nl, http://geentijd.nu knows: html, JavaScript, dhtml, css, php, mysql, postgresql, xml, linux to learn: java, c++, perl, python