Changing Case (Uppercase to lowercase or inverse) using php

PHP provides functionality for changing the case of a string to all uppercase, all lowercase, or the first letter of a word to uppercase. The commands are strtoupper, strtolower, and ucwords, respectively.

Using the word case functions

");
echo("$username in lower case is ".strtolower($username).".
");
echo("$username in first letter upper case is ".ucwords($username).".
");
?>

The above code returns:

John Doe in upper case is JOHN DOE.
John Doe in lower case is john doe.
John Doe in first letter upper case is John Doe.


To seek challenging roles and to achieve excellence in the field of Open Source Web Technology with a profound spirit of commitment and dedication.

Share This Post

Recent Articles

© 2017 Sumit Bansal. All rights reserved. Site Admin · Entries RSS · Comments RSS
Powered by WordPress · Designed by Theme Junkie