%s зовут %s. %s %s %s", ($_POST['sex'] == 'male' ? 'Его' : 'Ее'), (ucfirst($_POST['name'])), ($_POST['sex'] == 'male' ? 'ему' : 'ей'), ($_POST['age']), $postfix);
function declination($number, $titles)
{
$cases = array(2, 0, 1, 1, 1, 2);
return /*$number." ".*/ $titles[($number % 100 > 4 && $number % 100 < 20) ? 2 : $cases[min($number % 10, 5)]];
}