if you are creating website, as a webmaster, you need to know as much as you can when designing websites also.

so lets say you have a database with user's name, you have the first name and the last name, well, you want capitalize their names, just in case they are not in your databse, so once you have done a query in your database and got a name by "john".. as you can see, john is not capitalize, so to put the a capital letter or an upper case letter on the firs character of the word john, we can use php ucwords() function:

echo ucwords($string);


or how about you have a title of your page, its important to capitalize it, for example, our title of our page is:

$string = "wallpaperama is an amazing collection of wallpapers";

so to capitalize our title, we can use this code:

<?php
$string ="wallpaperama is an amazing collection of wallpapers";
echo ucwords($string);
?>


and this is how it would display or show on your browser:

Wallpaperama Is An Amazing Collection Of Wallpapers

as you can see, this is a way to put capital letters on all the words in a sentence