[code]function end_str($num, $var) {
$res = $var[2];
$a = $num % 100;
$b = $num % 10;
if($a > 10 && $a < 20) $res = $var[2];
elseif($b > 1 && $b < 5) $res = $var[1];
elseif($b == 1) $res = $var[0];
return $res;
}
echo "<font color='#ff0000'>Сообщени".end_str($k_new, array("е","я","й"

)." +$k_new</font></a></div>";[/code]