PHP strtoupper() Function
The strtoupper() function in PHP is used to convert a string to uppercase.
This function is binary-safe. The related functions are as follows:
- strtolower()
- lcfirst()
- ucfirst()
- ucwords()
Syntax
strtoupper ( string $string )
Parameter
string(required)- This parameter represents the input string.
Return
This function returns a string with all alphabetic characters converted to uppercase.
Example 1
Output
Actual String: PHP is an easy language to learn. After strtoupper() function... New string: PHP IS AN EASY LANGUAGE TO LEARN.
Example 2
Output
After strtoupper() function... The places to visit in India are as follow: 1.TAJ MAHAL 2.LOTUS TEMPLE 3.AKSHARDHAM TEMPLE
Example 3
Output
email id: After strtoupper() function... email id: