$str = "ñame águila épsilon"; echo mb_convert_encoding(mb_convert_case($str, MB_CASE_TITLE), "UTF-8");