PHP ucfirst Function

What is ucfirst Function?


In PHP, this function converts the first character of a string to uppercase.



In the above syntax, given "string" is the input whose first character need to be converted to uppercase.

Example :

echo ucfirst("web world");
Result :

Web world

In the above example the first character "w" of the string "web world" is changed to upper case.

PHP Topics

Ask Questions

Ask Question