I am making an inventory for items on my game site. Now I want three items per line and I am using a while loop. The thing is, I can only get 1 item per line and like I said I want 3 per line. How would I do this. So far my code is...
$s = mysql_query("SELECT * FROM inventory, items WHERE username='$username' AND inventory.iid=items.id") or die(mysql_error());
<table width=300>";
while ($i = mysql_fetch_array($s)) {
echo "<tr>
<td width=100>
<center>
<img src=$i[image] alt=$i[Name] width=60 height=60>
<br>
<b>Name:</b> $i[Name]
</td>
<td width=100>
<center>
<img src=$i[image] alt=$i[Name] width=60 height=60>
<br>
<b>Name:</b> $i[Name]
</td>
<td width=100>
<center>
<img src=$i[image] alt=$i[Name] width=60 height=60>
<br>
<b>Name:</b> $i[Name]
</td>
</tr>";
}
echo "</table>";
Thank you in advance. Any help would be appreciated.