half on the right and half on the left

streamer_

New Member
I am currently trying to find a good solution for what to do with this\[code\]$all_products\[/code\]this is an array with 7 products and i need to loop through them to create the dynamic page but i have kind of a structure issue with the page\[code\]<div class="left-pane left"> <div class="item"> </div> <div class="item"> </div> <div class="item"> </div> <div class="item"> </div> <div class="item"> </div></div><div class="right-pane left"> <div class="item"> </div> <div class="item"> </div> <div class="item"> </div> <div class="item"> </div> <div class="item"> </div></div>\[/code\]How will I know how many to put in the right and the left and can i alternate between then or do i need to do something like (count($all_product) / 2) on the left and then the rest on the right pane. Also how do i loop only half on one side using. how do i find out what to do because the array will be different count every time\[code\]<?php foreach ($all_products as $product) { ?>\[/code\]
 
Back
Top