mirror of
https://github.com/fenom-template/fenom.git
synced 2023-08-10 21:13:07 +03:00
13 lines
366 B
PHP
13 lines
366 B
PHP
<?php
|
|
|
|
function fenom_modifier_spellcount($num, $one, $two, $many)
|
|
{
|
|
if ($num % 10 == 1 && $num % 100 != 11) {
|
|
echo $num . ' ' . $one;
|
|
} elseif ($num % 10 >= 2 && $num % 10 <= 4 && ($num % 100 < 10 || $num % 100 >= 20)) {
|
|
echo $num . ' ' . $two;
|
|
} else {
|
|
echo $num . ' ' . $many;
|
|
}
|
|
}
|
|
?>
|