In PHP when we deal with string then change case functions are very important for text manipulation. below we discus each function about changing the text case.
Changing the Case of a Character
Spouse if any one submit some information in string format like that his/her name in small latter but you want to store his/her name in capital latter or title case in which each character of word is capital or any else then you have following function.
for example
ucwords( ) function return the text in title case means every character of the each word is capital.
The above Code return name as follow:
Tauqeer Shah
If you want to change only first latter as capital latter then use ucfirst( ) function.
This will be return as:
Tauqeer Shah
If you want to convert all the letters in upper then you can use the strtoupper( ) function.
This will be return as:
TAUQEER SHAH
If you want to convert all the letters in lower then you can use the strtolower( )function.
This will be return as:
tauqeer shah
Variables in PHP
PHP Concatenation
Calculation in PHP
If Statements in PHP
if ... else Statements in PHP
Nested IF Structure in PHP
PHP Comparison Operators
Switch Statement in PHP
Logical Operators In PHP
PHP Booleans
FOR Loop in PHP
While Loop In PHP
foreach Loop In PHP
Break Statement
Array In PHP
Associative Array
The Count function
Changing Case Function
Trim Function In PHP
Str_shuffle( ) function
strpos function in PHP
Explode() Function in PHP
Function
Passing Function Arguments
Server Variables
Header Function
Include Function
The require Function