php method to convert a string to uppercase: first create a PHP sample file; then directly convert all specified strings to uppercase through the "strtoupper("Hello WORLD!");" statement.
#The operating environment of this article: Windows7 system, PHP7.1, Dell G3 computer.
strtoupper() function converts a string to uppercase.
Note: This function is binary safe.
Example
Convert all characters to uppercase:
<?php echo strtoupper("Hello WORLD!"); ?>
Output:
HELLO WORLD.
[Recommended: PHP video tutorial】
The above is the detailed content of How to convert string to uppercase in php. For more information, please follow other related articles on the PHP Chinese website!