hello.,
please guys how to print two defrant divs in while loop,
example this pic
please guys how to print two defrant divs in while loop,
example this pic
<?php
for($i=0;$i<5;$i++) {
$post_bg = ($bg++%2 == 0) ? "black" : "white";
echo "<div style='background-color: $post_bg'>text</div>";
}
?>
Comment