I am trying to do something like this
http://i26.photobucket.com/albums/c111/jch02140/Screenshots/img.gif
but the code I have doesn’t seem to do what I want…
[php] <?php
while($item_rows = mysql_fetch_array($item_result))
{
$output = "
<tr bgcolor="#000000">
<td align=“center”>
<img src="…/images/".$item_rows[‘item_id’].".gif" width=“45” height=“45” />
“.$item_rows[‘name’].”
Attack: +".$item_rows[‘attack’]."
<img src="…/images/credit.gif" width=“17” height=“17” />$".$item_rows[‘sell_price’]."
[Equipt|Destory]
";
$remainder = $i % 5;
echo ($remainder == 0 ? ($i == 0 ? "" : "\n</tr>")."\n$output " : $output);
}
$colspan = (4 - $remainder);
$last_row = $colspan ? " <td ".($colspan? "colspan=$colspan" : "")."></td>" : "";
echo $last_row. "
</tr>
</table>";
?>[/php]