[b]Full Code[/b] [code]<?php include('header.php') ?> <? include("dbinfo.inc.php"); mysql_connect(localhost,$user,$password); @mysql_select_db($database) or die( "Unable to select database"); $query="SELECT * FROM roster ORDER BY name"; $result=mysql_query($query); $num=mysql_numrows($result); mysql_close(); ?> <center> <table align="center" max-width="480" width="480" cellpadding="2" cellspacing="0" border="1" bordercolor="#000000"> <tr> <td width=480 background="images/backgrounds/menubg.jpg" align="center"><font face="verdana" color="#FF0000" size="2"><b> Viewing All Wrestlers (<?php echo "$num" ?>) </td> </tr> <tr> <td bgcolor="333333" valign="top" width="480" align="left"> <font face="verdana" size="2" color=black> <table width='480'> <? $i=0; $first_letter_old=""; 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> </td> </tr> </table> <?php include('footer.php') ?>[/code] [b]Main Bit of Code that needs editing[/b] [code]<? $i=0; $first_letter_old=""; 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>"; } ?>[/code] I need to somehow make the code make a < br> after 5 <td> rows are printed so the maximum amount of rows is 5. I currently have no idea how to do this, so help would be appreciated. :)