I am new and trying to figure out a way to take my records from the data base and display 4 to a row instead of just one record at a time...
Here is the code I am working with.
$query = "select * from products"; $result = mysql_query($query); echo "<table width=\"100%\" border=\"0\" align=\"center\">\n"; while($row=mysql_fetch_array($result, MYSQL_ASSOC)) { $prodid = $row['prodid']; $description = $row['description']; $price = $row['price']; $quantity = $row['quantity']; echo "<tr><td align = \"center\">\n"; echo "<tr><td><img src=\"showimage.php?id=$prodid\" width=\"80\" height = \"80\">\n</br>"; echo "<a href=\"updatecart.inc.php?id=$prodid\"> $description </a>" ; echo "</td></tr>\n"; } echo "</table>\n"; ?>
I thank you in advance for your help.