Hi All, This is my first post here at webmasterlingo.com.

Yaaayyy!!!
I have a small problem that needs solved and I'm running out of ideas to solve it, so I come to the members of this site seeking help.
I have an html table that prints out info passed to it by MySQL. The problem is that some entries are more then 10. what I want it to do is when it hits the first ten, start a new row. So visually it looks like this.
----------------------------------------
tex | text | text // this goes up to ten
----------------------------------------
tex | text | text // this goes up to ten too
----------------------------------------
And at that point I want it to create a new <tr></tr> for the rest of the entries
Here is the code at the moment. It might be a little confusing but any help would be greatly appreciated.
PHP Code:
while ($count_against <= $count_rooms) {
// this is where I want to tell it to start a new html table row when it hits 10
if () {
print "<tr>\n";
while ($count_against <= $count_rooms) {
//while ($count_against <= 10) {
print "<td width=\"75\" align=\"center\" valign=\"top\"><div class=\"mainTextMargin\"> ".$room_title[$count_against]."</div></td>";
$count_against++;
}
$width = 75*$count_against-750;
print "<td width=".$width."> </td>";
print "</tr>\n";
print "<tr>";
print "<td height=\"1\" colspan=\"45\" class=\"tdBlack\"><img src=\"images/trans.gif\" width=\"1\" height=\"1\"></td>";
print "</tr>";
print "<tr>";
$count_against = 0;
while ($count_against <= $count_rooms) {
//while ($count_against <= 10) {
print "<td width=\"75\" align=\"center\" valign=\"top\"><div class=\"mainTextMargin\"> ".$room_dimensions[$count_against]."</div></td>";
$count_against++;
}
$width = 75*$count_against-750;
print "<td width=".$width."> </td>";
print "</tr>";
}
}
?>