Home > Article > Backend Development > How to convert English lowercase to uppercase in php
php method to convert English lowercase to uppercase: first create a new "test.php" file; then create the code "$str = strtoupper($str)" in the file; finally run " localhost/test.php".
Recommended: "PHP Video Tutorial"
##php Method to convert English primary school to uppercase:
The function of php to convert lowercase to uppercase is: strtoupper()First create a new test.php file and add the following content:<?php $str = "www.php.cn"; $str = strtoupper($str); echo $str; ?>Then run the file in the browser
Function introduction:
Related functions:Syntax:lcfirst() - Convert the first character in the string to lowercase
strtolower() - Convert the string to lowercase
ucfirst() - Convert the string to lowercase Convert the first character in the string to uppercase
ucwords() - Convert the first character of each word in the string to uppercase
strtoupper(string)Parameters
The above is the detailed content of How to convert English lowercase to uppercase in php. For more information, please follow other related articles on the PHP Chinese website!