Skip to content

ucfirst ​

php
string ucfirst

( string $string ) Converts the first character of $string to uppercase if it is a letter, and returns the resulting string.

Example:

php
$surname = "kowalski";
print(ucfirst($surname));

Result:

Kowalski