No basically $rows is going to know that there are 50 things to output.
$i is going to count them.
Then basically inside the loop which is outputting results:
Put this:
if ($i < ($rows / 2)) {
// do something with the values
}
Inside that "if" statement which only gets executed on #25 (the halfway point if you have 50) echo out a "</td><td>" which will start the new row.

Hope that helps.
