How to convert php characters to uppercase letters: Use the built-in function strtoupper(); this function can convert a string to uppercase and then return a string converted to uppercase, the syntax is "strtoupper(string)".
php Convert characters to uppercase letters
<?php echo strtoupper("h"); ?>
Output:
H
Recommended : "PHP Video Tutorial"
Description:
strtoupper() function converts a string to uppercase.
Syntax
strtoupper(string)
Parameters:
string is a required parameter, used to specify the string to be converted.
Return value: Returns the string converted to uppercase.
Example:
<?php echo strtoupper("hello world!"); ?>
Output:
HELLO WORLD!
Related functions:
The above is the detailed content of How to convert characters to uppercase letters in php?. For more information, please follow other related articles on the PHP Chinese website!