PHP ucwords Function

What is ucwords Function?


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



In the above syntax "string" is the input in which first character of each word is converted to uppercase.

Example :

echo ucwords("hi how are you!");
Result :

Hi How Are You!

In the above example first letter of all the words of the string is converted to uppercase.

PHP Topics

Ask Questions

Ask Question