Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function PluralForms($n, $forms) {
- //$forms = array("объект", "объекта", "объектов");
- $word = $n % 10 == 1 && $n % 100 != 11 ? $forms[0] : ($n % 10 >= 2 && $n % 10 <= 4 && ($n % 100 < 10 || $n % 100 >= 20) ? $forms[1] : $forms[2]);
- return $word;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement