Last active
October 4, 2015 20:13
-
-
Save Zillionx/8ce0c7b3315c4b6de348 to your computer and use it in GitHub Desktop.
Capitalize words with PHP function ucwords... crazy :)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?PHP | |
/* http://php.net/manual/en/function.ucwords.php */ | |
// ucwords works only if You add 'strtolower' to make the remaining characters lowercase... | |
// crazy! | |
$Fname = ucwords(strtolower("JOHN")); | |
$Lname = ucwords(strtolower("DOE")); | |
// John Doe | |
echo $Fname." ".$Lname; | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment