Skip to content

Instantly share code, notes, and snippets.

@Shipu
Last active September 19, 2017 21:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Shipu/fd85ec5254021e3b5228f74f0fa2f5b6 to your computer and use it in GitHub Desktop.
Save Shipu/fd85ec5254021e3b5228f74f0fa2f5b6 to your computer and use it in GitHub Desktop.
Even Loop Printing
<?php
$data = [1,2,3,4,5,6,7, 8];
echo "<div class='own-countersoul'>";
for($i = 0; $i < count($data); $i += 2) {
echo "<div class='item'>";
echo "<div class='single_item'>".$data[$i]."</div>";
echo "<div class='single_item'>".$data[$i+1]."</div>";
echo "</div>";
}
echo "</div>";
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment