I need help. I am starting up a tcg and I want a certain number of cards to be displayed in each row. Right now, there are 4 rows with 6 images and 1 row with 2 images. How can I alter the code below to to have just 5 rows, with 5 images in each? The script works fine, I just wanted to know how to limit the displayed number of images in each row.
Here is the PHP code I'm using now:
_________________________________________________
<?php include("../tcgadmin/config.php");
include($header);
$cld = CleanUp($_GET['d']);
$d = "$cld";
$fill="00";
$result=mysql_query("SELECT DISTINCT `deckfilename`, `deckname`, `descrip`,
`totalcards`, `cardvalue`, `masterable`, `category`, `cardwidth`, `cardheight` FROM
`$tablename2` WHERE `deckfilename`='$d'") or die("Unable to select database.");
$row=mysql_fetch_array($result);
$row[deckname] = stripslashes($row[deckname]);
$row[descrip] = stripslashes($row[descrip]);
echo "<div class=\"title\">Cards - $row[deckname]</div><p></p>";
echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr><td align=\"left\"
valign=\"top\"><img
src=\"$cardsurl/$row[category]/$row[deckfilename]/$row[deckfilename]$fill.gif\"
border=\"0\" width=\"$row[cardwidth]\" height=\"$row[cardheight]\"
alt=\"$row[deckname] Filler\" /> <img
src=\"$cardsurl/$row[category]/$row[deckfilename]/mastered.gif\" border=\"0\"
width=\"$row[cardwidth]\" height=\"$row[cardheight]\" alt=\"$row[deckname] Mastered
Card\" /></td><td width=\"4\"></td><td align=\"left\"
valign=\"top\"><p><b>Description:</b> <i>$row[descrip]</i><br />
<b>Cards in Deck:</b> $row[totalcards]<br />
<b>Value per Card:</b> $row[cardvalue]<br />
<b>Masterable?</b> $row[masterable]</p></td></tr></table>";
echo "<p style=\"text-align:left\">";
$result2=mysql_query("SELECT * FROM $tablename2 WHERE deckfilename='$d'
ORDER BY id ASC") or die(mysql_error());
while($row2=mysql_fetch_array($result2)) { echo "<img
src=\"$cardsurl/$row2[category]/$row2[deckfilename]/$row2[deckfilename]$row2[car
dnum].gif\" border=\"0\" alt=\"$row2[deckfilename]$row2[cardnum] card\" /> "; }
echo "</p>
<p>REMEMBER: You may NOT take cards from here to add to your TCG page.
<b>THESE ARE FOR VIEWING PURPOSES ONLY!</b></p><p><a
href=\"index.php\">Back</a>";
include($footer); ?>
_________________________________________________
Thanks!!