PHP strtoupper function is used to convert strings to uppercase. The strtoupper syntax is strtoupper(string), and the parameter string is required and specifies the string to be converted.
How to use strtoupper function?
Function: Convert all characters to uppercase
Syntax:
strtoupper(string)
Parameters:
string Required, specifies the string to be converted
Description: The strtoupper() function converts a string to uppercase. This function is binary safe.
php strtoupper() function usage example 1:
<?php $i = "hello world"; $j = strtoupper($i); echo $j; ?>
Output:
HELLO WORLD
php strtoupper() function usage example 2:
<?php $i = "I'm study in php.cn"; $j = strtoupper($i); echo $j; ?>
Output:
I'M STUDY IN PHP.CN
This article is an introduction to the PHP strtoupper function. I hope it will be helpful to friends in need!
The above is the detailed content of How to use php strtoupper function. For more information, please follow other related articles on the PHP Chinese website!