Skip to content

Instantly share code, notes, and snippets.

@davist11
Created September 24, 2013 18:57
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 davist11/6689545 to your computer and use it in GitHub Desktop.
Save davist11/6689545 to your computer and use it in GitHub Desktop.
<?php
public function modulo()
{
$numerator = $this->EE->TMPL->fetch_param('numerator', '1');
$denominator = $this->EE->TMPL->fetch_param('denominator', '1');
$denominator = ($denominator == 0) ? 1 : $denominator;
return $numerator % $denominator;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment