[code]<? include("dbconnect.php"); $a=0; $b=0; ?> <table cellpadding="0" cellspacing="0" width="430" style="border-color: #000000; border-width: 1px;"> <? while($a < $catnum) { $cat=mysql_result($catresult,$a,"name"); ?> <tr> <td width="206" style="border-bottom: solid; border-left: solid; border-top: solid; border-width: 1px;"><font face="Verdana" size="2"> <b><? echo $cat; ?></b></font></td> <td width="70" align="center" style="border-bottom: solid; border-left: solid; border-top: solid; border-width: 1px;"><font face="Verdana" size="1">Post Num</font></td> <td width="85" align="center" style="border-bottom: solid; border-left: solid; border-top: solid; border-width: 1px;"><font face="Verdana" size="1">Thread Num</font></td> <td width="150" align="center" style="border-bottom: solid; border-left: solid; border-top: solid; border-right: solid; border-width: 1px;"><font face="Verdana" size="2">Latest Post:</font></td> </tr> <? $a++; $forumquery="SELECT * FROM forums WHERE catgroup='$cat' ORDER BY `ordernum` ASC"; $forumresult=mysql_query($forumquery); $forumnum=mysql_num_rows($forumresult); while($b < $forumnum){ $catname=mysql_result($forumresult,$b,"name"); $description=mysql_result($forumresult,$b,"description"); ?> <tr> <td width="206" style="border-bottom: solid; border-left: solid; border-width: 1px;"><font face="Verdana" size="2"> <b><? echo "$catname</b><br>$description"; ?></font></td> <td width="70" align="center" style="border-bottom: solid; border-left: solid; border-width: 1px;"><font face="Verdana" size="1">Post Num</font></td> <td width="85" align="center" style="border-bottom: solid; border-left: solid; border-width: 1px;"><font face="Verdana" size="1">Thread Num</font></td> <td width="150" align="center" style="border-bottom: solid; border-left: solid; border-right: solid; border-width: 1px;"><font face="Verdana" size="2"><? echo "$cat -- $catname || "; ?></font></td> </tr> <? $b++; } echo "<tr><td> </td></tr>"; } ?> </table>[/code] Thats my Code and at the top there is While and in that While is another While