do a loop?
set the loop to display four records, a line break, and then four more records, a line break, and so on.
$total = totalNumberOfRecordsToBeDisplayed;
$break = theNumberOfRecordsDisplayedBetweenLineBreaks;
for($counter=0; $counter<$total; $counter++)
{
codeThatDisplaysARecord;
if($counter == $break)
{
echo "<br>";
}
}
you'll need to change the code to include the lines needed to get the number of records and display the records, but seeing as you're already successful at displaying the records, it shouldn't be much trouble for you.
|