I've been trying to figure out a way to do this for a while now and I can't work it out at all.
product_column product_row product_name
__________________________________________________
1 1 product_1
1 2 product_2
1 3 product_3
2 1 product_4
2 2 product_5
2 3 product_6
3 1 product_7
3 2 product_8
3 3 product_9
4 1 product_10
4 2 product_11
4 3 product_12
That's a snippet of the table, what I'm trying to establish is a grid-like display of the products, where the product_columns are parent divs and the product_rows in these columns are child divs, like below;
<div class = "parent">
<div class = "child">
product_1
</div>
<div class = "child">
product_2
</div>
<div class = "child">
product_3
</div>
</div>
<div class = "parent">
<div class = "child">
product_4
</div>
<div class = "child">
product_5
</div>
<div class = "child">
product_6
</div>
</div>
Like I say I've been plugging away it for quite a while now and I've hit a stumbling block. The number of columns is not a set number either.
Thank you in advance for any help I receive.