Thanks for your patience.
I apologize for being a bit confusing, the example you posted is close to what I am trying to achieve; however there are two main differences:
1 - I want to control the number of columns in the html output, i.e. <div>s as opposed to css
2 - I needed it for the new/featured/specials modules
Trying to be more specific:
in includes/modules/new_products.php file I see the output loop for the new products
$list_box_contents[$row][$col] = array('params' => 'class="centerBoxContentsNew centeredContent back"' . ' ' . 'style="width:' . $col_width . '%;"',
'text' => (($new_products->fields['products_image'] == '' and PRODUCTS_IMAGE_NO_IMAGE_STATUS == 0) ? '' : '<a href="' . zen_href_link(zen_get_info_page($new_products->fields['products_id']), 'cPath=' . $productsInCategory[$new_products->fields['products_id']] . '&products_id=' . $new_products->fields['products_id']) . '">' . zen_image(DIR_WS_IMAGES . $new_products->fields['products_image'], $new_products->fields['products_name'], IMAGE_PRODUCT_NEW_WIDTH, IMAGE_PRODUCT_NEW_HEIGHT) . '</a><br />') . '<a href="' . zen_href_link(zen_get_info_page($new_products->fields['products_id']), 'cPath=' . $productsInCategory[$new_products->fields['products_id']] . '&products_id=' . $new_products->fields['products_id']) . '">' . $new_products->fields['products_name'] . '</a><br />' . $products_price);
where if I am correct it creates the rows, and columns
$list_box_contents[$row][$col]
based on the number of new products, and the width of each column is given by this piece
{
$col_width = floor(100/$num_products_count);
} else {
$col_width = floor(100/SHOW_PRODUCT_INFO_COLUMNS_NEW_PRODUCTS);
}
Now, I would like to remove that condition, and decide the number of columns using <div>s preventively (beforehand), thus why I said it could be seen as <table> use and output as well, whereas
<table><tr>
<td>insert new product 1</td>
<td>insert new product 2</td>
</tr>
<tr>
<td>insert new product 3</td>
<td>insert new product 4</td>
</tr></table>
would be the same as
<div class="myRow">
<div class="myColumn">insert new product 1</div>
<div class="myColumn">insert new product 2</div>
</div>
<div class="myRow">
<div class="myColumn">insert new product 3</div>
<div class="myColumn">insert new product 4</div>
</div>
I tried removing the "style="width:' . $col_width . '%;"" piece, and add <div> after 'text' => but as you can guess it outputs error.