Ik ben nieuw met PHP en ook op deze forum maar ik zit met het volgende:
Ik heb mijn productenlijst nu in 1 kolom dus alle producten onderelkaar
maar ik wil ze graag in 2 kolommen.
zo heb ik het nu

zo wil ik het hebben

mijn php code:
<?php
//error reporting
error_reporting('e_all');
ini_set('display_errors','1');
?>
<?php
// Run a select query to get my latest 6 items
// Connect to the MySQL database
include "storescripts/connect_to_mysql.php";
$dynamicList = "";
$sql = mysql_query("select * from products order by date_added desc limit 6");
$productcount = mysql_num_rows($sql);
if ($productcount > 0) {
while($row = mysql_fetch_array($sql)){
$id = $row["id"];
$price = $row["price"];
$product_name = $row["product_name"];
$date_added = strftime("%b %d, %Y", strtotime($row["date_added"]));
$dynamicList .= '<table width="280" height="27" border="0" cellpadding="5" cellspacing="0">
<tr>
<td width="70"><a href="product.php?id=' . $id . '"><img src="inventory_images/'.$id.'.jpg" alt="' . $product_name . '" width="100" height="70" border="1" /></a></td>
<td width="251" valign="top">' . $product_name . '<br />
€' . $price . '<br />
<a href="product.php?id=' . $id . '"><img src="images/bekijk_product.jpg" width="100" height="30"></a>
</a>
</td>
</tr>
</table>';
}
} else {
$dynamicList = "We have no products listed in our store yet";
}
mysql_close();
?>