faqts : Computers : Programming : Languages : PHP : Database Backed Sites

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

2 of 2 people (100%) answered Yes
Recently 2 of 2 people (100%) answered Yes

Entry

How can I display my query results in a 2 column HTML table?

Mar 10th, 2006 08:47
Praveen Kumar Kukkapalli, Jon F,


If I understood correctly.....
If you want to retrieve values from 2 fields and show those, you can do
in the following way...
<table>
<?php
while($row = mysql_fetch_array($result))
{
?>
<tr>
   <td><?=$row[0]?></td>
   <td><?=$row[1]?></td>
</tr>
<?php
}
?>
</table>