When looping through an array how can I create a different css div style for the last element to be output in my array.
for($i=0;$i<=count($productid);$i++){
Like this:
if($productid[$i] == $productid[count($productid)-1]){ //last element code here } elseif (($productid[$i] % 2 ){ //even row code here } else { //odd row code here }