Home >>PHP String Functions >PHP strtoupper() Function
PHP strtoupper() function is used to convert a given input string into uppercase. It takes a input string as a parameter and converts all the lowercase english alphabets present in the input string to uppercase. All the other numeric characters or special characters present in the string remains as it is. It is binary-safe.
Syntax:
strtoupper( $string );
Parameter | Description |
---|---|
string | This is a required parameter. This parameter defines the string to convert. |
Here is an example of strtoupper() function in PHP:
<html> <body> <?php echo strtoupper("phptpoint"); ?> </body> </html>
Here is an another example of strtoupper() function in PHP:
<html> <body> <?php $str = "Hello Everyone.. I am 21 Years Old!!"; echo strtoupper($str); // Numeric & special chars remains same ?> </body> </html>