Here is my current code for my inventory
<?php
include"jocey.inc.php";
include "header.php";
$username = $_COOKIE['user'];
$connection = mysql_connect($host, $user,$password)
or die ("Couldn't connect to server.");
mysql_select_db($database, $connection)
or die ("Couldn't select database."); //20
$result = mysql_query("SELECT * FROM el_inventory, el_items WHERE el_inventory.username='$username' AND el_items.name= el_inventory.name");
?>
<b>Click on an item that you wish to use. Then, a page with information and a list of available actions will be shown. You
will be able to trade it, give it away and much much more. </b>
<br><br><br>
<table border=0>
<center>
<?php
while ($row = mysql_fetch_assoc($result)){
echo "<tr><td>";
echo $row['name'];
echo "</td><td>";
echo "<a href='packaction.php?name=$row[name]&id=$row[itemid]'><img src='$row[pic]'></img></a>";
echo "</td></tr>";
}
?>
</table>
<BR><BR><BR><BR><BR><BR>
<?php include"footer.php"; ?>
Now, lets say v w x, y and z are all items in my inventory. Right now it will display them like this
v
w
x
y
z
Now I want them to be displayed like this
v w x
y z
Or so there is three items a row ( the row on the screen )
if I add more of these codes
echo "<tr><td>";
echo $row['name'];
echo "</td><td>";
echo "<a href='packaction.php?name=$row[name]&id=$row[itemid]'><img src='$row[pic]'></img></a>";
echo "</td></tr>";
[code=php]
it will make the page look like this
v v v
w w w
x x x
y y y
z z z
Or a duplicate for every code i add. I dont want that though.