PHP - Update string to upper using strtoupper

by
Jeremy Canfield |
Updated: October 07 2022
| PHP articles
strtoupper can be used to update a string to have all upper case characters. For example, let's say you have a variable that contains the text Hello World.
$string = "Hello World";
In this example, the $string will be updated to upper.
$string = strtolower($string);
Now, when you echo $string . . .
echo $string;
. . . the following will be displayed.
HELLO WORLD
Did you find this article helpful?
If so, consider buying me a coffee over at