How To Convert String To Uppercase in PHP

How To Convert String To Uppercase in PHP

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.

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

Comments

Popular posts from this blog

Gove confirms mandatory housebuilding targets for councils will be abolished in face of Tory rebellion – UK politics live

Kotak Mahindra Bank Recruitment 2022 Released for Graduate Candidates And Apply Online