Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PHP Script To Display MySQL Query In A Table

Status
Not open for further replies.

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
 
u have to make an for loop:

$rows = mysql_num_rows($result);

<table>
for($i = 0; $i < $rows; $i++) {
echo &quot;<tr>&quot;;
echo &quot;<td></td>&quot;;
echo &quot;</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

knows: html, JavaScript, dhtml, css, php, mysql, postgresql, xml, linux
to learn: java, c++, perl, python
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top