You can use the strtoupper() function in PHP to convert all characters in a string to uppercase.
Function syntax:
strtoupper(string)
string: required. Specifies the string to be converted.
Example:
<!DOCTYPE html> <html> <body> <?php echo strtoupper("Hello WORLD!"); ?> </body> </html>
The effect is as follows:
php中文网.
The above is the detailed content of How to convert all letters to uppercase in php. For more information, please follow other related articles on the PHP Chinese website!