Replace the last part with this--
Code:
// store the record of the "example" table into $row
for($x=0;$row = mysql_fetch_array($result);$x++){
if ($x==3) {
echo '<tr>';
}
// output the product's grid cell
echo "<div class='gridCell' style='width: {$gridCellWidth}px;margin:0 {$gridCellSpacing}px {$gridCellSpacing}px 0;'></div>";
echo $row['content'];
echo "<div class=\"clearMe\"></div><br /><div class='count' style='width:".$gridWidth."px'>\n\n";
if ($x==3) {
$x=0;
echo '</tr>';
}
}
}
Alternatively, remove the first if($x..... and that will allow just text after the row.
I used <tr> and </tr> for placeholders for whatever you want to use to split the rows.
Bookmarks