Skip to content

Instantly share code, notes, and snippets.

@tot-ra
Created March 18, 2013 23:53

Revisions

  1. tot-ra created this gist Mar 18, 2013.
    8 changes: 8 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,8 @@
    function num2MultipleRus($int){
    $str=strval($int);
    $fin=$str[strlen($str)-1];

    if ($fin==1) return 1;
    elseif ($fin>1 && $fin<5) return 2;
    elseif ($fin>4) return 3;
    }