Skip to content

Instantly share code, notes, and snippets.

@farico
Created January 7, 2011 14:17
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 farico/769495 to your computer and use it in GitHub Desktop.
Save farico/769495 to your computer and use it in GitHub Desktop.
komentarai
function linksnis($skaicius, $komentaras, $komentarai, $komentaru) {
if ( $skaicius % 10 == 0 || between(substr($skaicius, -2), 10, 20) ) {
return $komentaru;
}
elseif ( substr($skaicius, -1) == 1 && $skaicius != 11 ) {
return $komentaras;
}
return $komentarai;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment