DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/index.php)
-   PHP (http://www.daniweb.com/forums/forum17.html)
-   -   I need some help with a php table (http://www.daniweb.com/forums/thread8627.html)

Tsunami Jul 29th, 2004 10:07 pm
I need some help with a php table
 
Hello again.I am trying to make a php table with a list of items going down with the cost of any thing.If some could please type yo a simple php table script for me.I be thanks full to who ever does.

Thanks Jon

PoA Jul 30th, 2004 7:22 am
Re: I need some help with a php table
 
[PHP]
<?php
echo "<table>";
$query = mysql_query("SELECT col1, col2 FROM example");
while(list($col1, $col2)) = mysql_fetch_row($query)){
echo "
<tr>
<td>$col1</td>
<td>$col2</td>
</tr>";
}
echo "</table>";
?>
[/PHP]

Hope this is what you want


All times are GMT -4. The time now is 5:42 pm.

Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC