PHP ucwords() Function

Syntax : ucwords(string, delimiters)

The ucwords() function converts the first character of each word in a string to uppercase.

Example 1 :

 

<?Php

$str = "welcome to my WORLD!";  

echo ucwords($str); 

//output : Welcome To My WORLD!  

?>