RsD0p9BK
5/6/2015 - 10:12 AM

ucfirst.php

// ucfirst() и кирилица

$string = mb_convert_case($string, MB_CASE_TITLE, 'UTF-8');

// http://oleg.in-da.ru/dev/php/funkcija_ucfirst_i_kirilica_v_kodirovke_utf-8


// How to make the first 2 characters of a string uppercase?

$ucfirsttwo = strtoupper(substr($word, 0, 2)) . substr($word, 2);

// http://stackoverflow.com/questions/7013689/how-to-make-the-first-2-characters-of-a-string-uppercase