Hello RJT, I understand what you trying do do, but I have found some probs with ur code [code] <table width='480'> /*need to use escape chars to make use of " when using equals following the web standards*/ <? $i=0; $first_letter_old=""; /* dont know what this is for but im sure u got a valid reason, I have not included it in my solution */ while ($i < $num) { $name=mysql_result($result,$i,"name"); $image=mysql_result($result,$i,"image"); ++$i; echo "<td bgcolor=000000 valign='top' width='100' align='left'><center><a href='wrestler.php?name=$name'><img border=0 width=100 src='http://www.reef-break.com/scw/images/superstars/$image.jpg'></a><br><font face=verdana size=1 color=red><a href='wrestler.php?name=$name'>$name</a></font></center></td>"; } ?> </table> [/code] ok bascially you need a tr tag after your table declaration you are jumping straight into a td, minor mistake after too much coding :-X, so now it depends on you do you want 5 td's per row ? or the br after 5 td's i would go for the tr option but here is the edited code for you. [code] <?php $i=0; $j=0; $stringToEcho; $bolEndTr = false; $stringToEcho = "<table width=\"480\">\n"; $stringToEcho .= "<tr>\n"; while ($i < $num) { if ($num < 5){ $bolEndTr = true; /*We need to have this to make sure if there are less than 5 rows we must close the tr tag */ } $name=mysql_result($result,$i,"name"); $image=mysql_result($result,$i,"image"); ++$i; $stringToEcho .= "<td bgcolor=\"#000000\" valign=\"top\" width=\"100\" align=\"left\">\n"; $stringToEcho .= "<center>\n"; $stringToEcho .= "<a href=\"wrestler.php?name=$name\">\n"; $stringToEcho .= "<img border=\"0\" width=\"100\" src=\"http://www.reef-break.com/scw/images/superstars/$image.jpg\" />\n"; $stringToEcho .= "</a>\n"; $stringToEcho .= "<br>\n"; $stringToEcho .= "<font face=\"verdana\" size=\"1\" color=\"red\">\n"; $stringToEcho .= "<a href=\"wrestler.php?name=$name\">$name</a>\n"; $stringToEcho .= "</font>\n"; $stringToEcho .= "</center>\n"; $stringToEcho .= "</td>\n"; $j++; if ($j == 5){ $stringToEcho .= "</tr>\n"; $j=0; } } if ($bolEndTr){ $stringToEcho .= "</tr>\n"; } $stringToEcho .= "</table>\n"; echo $stringToEcho; ?> [/code] I hope this helps you, its also a good idea to make use of CSS for styling the elements you are displaying instead of having them in the page. It makes for easier editing 8)