submitted string lowercase with strtolower() before invoking ucwords(): : ucwords « String « PHP






submitted string lowercase with strtolower() before invoking ucwords():

 
<?php
$full_name = "tHis IS a tESt";
$full_name =  ucwords( strtolower($full_name) );
print $full_name; 
?>
  
  








Related examples in the same category

1.Controlling Case
2.ucwords() function capitalizes the first letter of each word in a string.
3.ucwords() makes the first letter of every word in a string uppercase.
4.ucwords.php
5.string ucwords ( string str ) converts the first letter of each word in the string to an uppercase character, leaving the others untouched.
6.Prettifying names with ucwords()