Skip to content

Instantly share code, notes, and snippets.

@zackkitzmiller
Created February 24, 2010 16:29
Show Gist options
  • Save zackkitzmiller/313581 to your computer and use it in GitHub Desktop.
Save zackkitzmiller/313581 to your computer and use it in GitHub Desktop.
<?php
foreach ($somethings as $thing) {
$count = 1;
if ($count == 4) {
echo "<div class='thing'>";
?>
LOTS OF HTML CONTENT HERE
</div> <!-- close div -->
<?
$count = 1;
} else {
echo "<div>";
?>
LOTS OF HTML CONTENT HERE
</div> <!-- close div -->
<?
}
$count++;
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment