I think I know what you mean so here I go.
I did a similar thing for a site not too long ago. Basically I just build a table with one row that has all the columns I am going to need. Then I have a loop like normal but instead of incrementing the variable by 1 I increment it by the number of columns I'll want to display and then I display all the columns in that row. Kinda difficult to explain so I'll just paste the code:
<table width="100%" border="0" cellpadding="3" cellspacing="0" class="bodytext">
<?php
/* This example assumes that you are looping through an array
and that you want to display 3 columns in each row
Notice below I am incrementing the iterator ($i) by the number
of columns I want to display.
*/
for ($i = 0; $i < count($products); $i += 3) {
//Then build the entire row using
//$products[$i] to get info for the first row
//$products[$i + 1] to get info for the second row
//$products[$i + 2] to get info for the third row
//etc.
?>
<tr><td>
<a href="product_page.php?product_id=<?php echo $products[$i]['products_id'] ?>">
<?php echo $products[$i]['name'] ?>
</a>
</td></tr>
<td>
<a href="product_page.php?product_id=<?php echo $products[$i + 1]['products_id'] ?>">
<?php echo $products[$i + 1]['name'] ?>
</a>
</td>
<td>
<a href="product_page.php?product_id=<?php echo $products[$i + 2]['products_id'] ?>">
<?php echo $products[$i + 2]['name'] ?>
</a>
</td></tr>
<?php
}
?>
</table>
This method does have the drawback that if you want to display more columns you have to go in and edit html code and it isn't as elegant as it could be. However it is nice because your table will never look broken in WYSIWYG editors which for me is a necessity as I work with designers who couldn't hand code if their lives depended on it 🙂.
Hope it helped