HOW TO USE THE ucwords() FUNCTION IN PHP
The ucwords() function converts the first letter of every word in a string to a capital letter.
Example 1:
$string="edmund hillary";
$newstring=ucwords($string);
echo $newstring;
The above will output: Edmund Hillary
Example 2:
$string="once upon a time in mexico.";
$newstring=ucwords($string);
echo $newstring;
The above will output: Once Upon A Time In Mexico.
|