<?php
function number($num, $one, $two, $more) {
$num = (int) $num;
$l2 = substr($num, strlen($num) - 2, 2);
if ($l2 >= 5 && $l2 <= 20)
return $more;
$l = substr($num, strlen($num) - 1, 1);
switch ($l) {
case 1:return $one;
break;
case 2:return $two;
break;
case 3:return $two;
break;
case 4:return $two;
break;
default:return $more;
break;
}
}
?>