Sorry, I didn't really read through your code before making that post, and I'm not that quick with tables without writing them out and testing them, so I'll explain what this does.
The whole "i" thing is like a counter. "i" is zero before the loop, and each time you make it to the bottom of the loop, "i" increases by one. If "i" is equal to nx where n is a positive integer and x is the number of lines you want before it skips a line so that if x = 5, nx = 5,10,15,20 etc, then i % 5 == 0. If "i" is not equal to n*x (say i = 6) then i % 5 != 0. So if you have this:
$i = 0;
while ( $r = mysql_fetch_array($result) )
{
if ( $i % 5 != 0 )
{
echo <tr></tr>;
}
// do other code here
++$i;
}
Then every 5 times through the loop, php will send "<tr></tr>" to the html for processing, which should create a blank line in your table... but like I said, I'm not that great with tables unless I test it, so replace "<tr></tr>" with whatever would be the best way to make a blank line in your table. Creating a "return" in text just uses <br> or if you want a blank line you can use <br><br> or if a <p> tag is already started, <p></p> would create a blank line without interrupting the rest of your code... If you want to know more about the "%" command, it's generally called "mod" and and "i % 5" divides i by 5 and gives the remainder, so a multiple of 5 has a remainder of zero. I think all that is more correct now, sorry about the confusing response before.