ucwords() function capitalizes the first letter of each word in a string : String Case : String PHP Source Code


PHP Source Code » String » String Case »

 

ucwords() function capitalizes the first letter of each word in a string



<?php
$original = "truth or consequences";
$capitalized = ucwords($original);
echo "While $original is a parlor game, $capitalized is a town in New Mexico.";
?>



           
       



HTML code for linking to this page:

Follow Navioo On Twitter

PHP Source Code

 Navioo String
» String Case