HTML tables in PHP

From: Date: Wed, 10 Apr 2002 18:17:16 +0000
Subject: HTML tables in PHP
Groups: php.db 
Request: Send a blank email to php-db+get-18401@lists.php.net to get a copy of this message
Hi everyone! Is there a good tutorial on how to write html tables in PHP? In my last post "Not displaying all records" I have the items displayig all the contents of the table but they are in descending order. like this item 1 item 2 Here is the code I am using $query = "SELECT id, name, image, quantity FROM {$config["prefix"]}_my_items WHERE uid={$session["uid"]} ORDER BY id"; $ret = mysql_query($query); while($row = mysql_fetch_array($ret)){ $image = $row['image']; $name = $row['name']; $quantity = $row['quantity']; $display_block ="<img src=$image><CENTER><br>$name<BR>$quantity</CENTER>"; echo "<table><tr><td>$display_block</td></tr></table>"; echo""; } I have already tried this $display_block ="<img src=$image><CENTER><br>$name<BR>$quantity</CENTER>"; echo "<table><tr><td>$display_block</td><td>$display_block</td></tr></table>"; echo""; But it displays 2 sets of all items still in descending order beside each other: item 1 item 1 item 2 item 2 What I wnat is to display them item 1 item 2 item 3 Is there a way to do this? Thanks Jennifer --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.344 / Virus Database: 191 - Release Date: 4/2/2002

« previous php.db (#18401) next »