Search results
ucfirst (string $string): string. Returns a string with the first character of string capitalized, if that character is an ASCII character in the range from "a" (0x61) to "z" (0x7a).
- Substr
Parameters. string. The input string. offset. If offset is...
- Str replace
Parameters. If search and replace are arrays, then...
- Strpos
Strpos - PHP: ucfirst - Manual
- Number format
Version Description; 8.0.0: Prior to this version,...
- Substr
Learn how to use the ucfirst() function in PHP to convert the first character of a string to uppercase. See the syntax, parameter values, return value, and examples of this function.
Learn how to use the PHP ucfirst() function to convert the first alphabetic character of a string to uppercase. See examples, syntax, and how to deal with multibyte characters using mb_ucfirst() function.
Learn how to use the ucfirst() function in PHP to capitalize the first character of a string. See syntax, example, quiz and practice your knowledge.
function mb_ucfirst(string $str, ?string $encoding = null): string { return mb_strtoupper(mb_substr($str, 0, 1, $encoding), $encoding) . mb_substr($str, 1, null, $encoding); } For PHP >= 7.0.0:
7 cze 2023 · Learn how to use the ucfirst () function in PHP to capitalize the first letter of a string. See examples, usage, documentation and community questions and answers.
ucfirst ( string $string ) : string. Returns a string with the first character of string capitalized, if that character is alphabetic. Note that 'alphabetic' is determined by the current locale. For instance, in the default "C" locale characters such as umlaut-a (ä) will not be converted.