Im new to this forum and new to php too… hope i get some help…
I have bootstrap column in while loop, what i want is if bootstrap last column is odd then i want column to be 12 (col-12), i found the way to check number even or odd but want to check last number so if last number (last column) is odd i want column to be 12 else remain col-6 i have tried:
<div class"<?php echo ($i == (2 || 4 || 6) )?'col-md-6':'col-md-12'; ?>">
display content there in while loop
</div>
<div class" <?php echo ($i % 2 == 0)?'col-md-6':'col-md-12'; ?>">
display content there in while loop
</div>
0 Answer(s)