My apologies, I accidentally clicked some key combination in Yahoo that sent off my message before I finished. Here we go again:
while ($row = mysql_fetch_array($sql_result)) { $col_1 = $row['column1']; $col_2 = $row['column2']; $col_3 = $row['column3']; $val_1 = $row['value1']; // and so on, you get the idea } I won't write out all of the HTML you'll need for creating your <table>, but if you can manage that yourself, then the only thing else you need to do is insert the following into the <td></td> cells: <?php echo $val_1; ?> // and so on for each value I have seen many instances where PHP coders wish to include the HTML structure in the while loop itself. That is just as well and will certainly make the task of creating each row of the table much easier. I separated the HTML from the while loop to (hopefully) explain things more clearly in case you're using a 3rd party product (such as Dreamweaver) to generate your table and simply need to know how to insert your PHP values into it. --- Rachel Rodriguez <[EMAIL PROTECTED]> wrote: > > --- Russell P Jones <[EMAIL PROTECTED]> wrote: > > I just want to print out a table from mySQL. Thats > > it. into an html table. > > > > Column 1 | Col 2 | Col 3 > > ------------------------- > > Val 1 | val 2 | val 3 > > Val 4 | val 5 | val 6 > > > > > > any ideas on how to do this? > > Sure, this is a fairly common thing to do. Use a > while loop. > > while ($row = mysql_fetch_array($result)) > { > > > > > Russ Jones > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: > http://www.php.net/unsub.php > > > > > ===== > ~Rachel > > > > > __________________________________ > Do you Yahoo!? > Yahoo! Domains – Claim yours for only $14.70/year > http://smallbusiness.promotions.yahoo.com/offer > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > ===== ~Rachel __________________________________ Do you Yahoo!? Yahoo! Domains – Claim yours for only $14.70/year http://smallbusiness.promotions.yahoo.com/offer -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php