In PHP, string related functions are most popular and widely used while programming. Among them, some set predefined string functions are used for working with string cases.
These functions are used to convert the string case from one another, and also, used to specify particular string with camel case representation. Such kind of PHP functions are listed below.
$str = "welcome to PHPPOT"; //Output: WELCOME TO PHPPOT echo $uppercase = strtoupper($str); //Output: welcome to phppot echo $lowercase = strtolower($str); //Output: Welcome to PHPPOT echo $uppercaseFirst = ucfirst($str); //Output: Welcome To PHPPOT echo $uppercaseWord = ucwords($str);
This PHP code tutorial was published on May 11, 2013.