PHP strtoupper()
Published Jul 12, 2023
The strtoupper() function converts all the characters in a string to uppercase.
Syntax
strtoupper(string_to_convert);
The string_to_convert parameter is the string that will be converted to uppercase.
Example
The following code demonstrates the use of strtoupper() to alter a string.
<?phpecho strtoupper("hello, world!");?>
The code results in the following:
HELLO, WORLD!
Learn PHP on Codecademy
- Looking for an introduction to the theory behind programming? Master Python while learning data structures, algorithms, and more!
- Includes 6 Courses
- With Professional Certification
- Beginner Friendly.75 hours