echo '<table><tr>';
$get = mysql_query("SELECT * FROM ncmallitems ORDER BY name ASC");
while($show = mysql_fetch_array($get))
{
echo '<td valign="top"><table><tr><td><img src="' . $show['imgurl'] . '" border="0" width="80" height="80" alt="' . $show['name'] . '" /></td></tr><tr><td width="120"><b>' . $show['name'] . '</b></td></tr></table></td>';
}
echo '</tr></table>';
That code creates the output seen on http://www.gnomeshieldgenerator.com/ncitems.php
My question is, how can I make is so that there are only 5 cells and then creates a new row? I have tried a few different ways, but cant seem to figure it out. At least not without it repeating the items etc.
$get = mysql_query("SELECT * FROM ncmallitems ORDER BY name ASC");
while($show = mysql_fetch_array($get))
{
echo '<td valign="top"><table><tr><td><img src="' . $show['imgurl'] . '" border="0" width="80" height="80" alt="' . $show['name'] . '" /></td></tr><tr><td width="120"><b>' . $show['name'] . '</b></td></tr></table></td>';
}
echo '</tr></table>';
That code creates the output seen on http://www.gnomeshieldgenerator.com/ncitems.php
My question is, how can I make is so that there are only 5 cells and then creates a new row? I have tried a few different ways, but cant seem to figure it out. At least not without it repeating the items etc.