Skip to content

Instantly share code, notes, and snippets.

@uppfinnarjohnny
Created January 25, 2010 20:16
Show Gist options
  • Save uppfinnarjohnny/286194 to your computer and use it in GitHub Desktop.
Save uppfinnarjohnny/286194 to your computer and use it in GitHub Desktop.
nth()
<?php
nth($what = 2, $loop = 'default') {
static $loops = array();
return ($loops[$loop] % $what == 0);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment