In this tutorial we will see How To Convert String To Uppercase in PHP. PHP strtoupper() function can be used to convert any string to Uppercase.
Table of Contents
Using strtoupper() Function
We can simply use strtoupper() Function to convert any string to Uppercase.
Take a look at the code given below.
<?php
$string = 'HowToCodeSchool.com';
$UpperCaseString = strtoupper($string);
echo $UpperCaseString;
?>
$UpperCaseString contains the Uppercase version of the original string.
Output
HOWTOCODESCHOOL.COM