Skip to content

Instantly share code, notes, and snippets.

@woodwardtw
Created March 17, 2014 01:38
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 woodwardtw/9592504 to your computer and use it in GitHub Desktop.
Save woodwardtw/9592504 to your computer and use it in GitHub Desktop.
add numbers per loop
<script type="text/javascript">
$(function(){
<?php
foreach ($responses as $i => $row)
{
if ($isFirst) {
$isFirst = false;
continue;
}
$isLast = ($i == $last);
echo "$('#container";
echo $i;
echo "').beforeAfter();";
}
?>
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment