Home  >  Article  >  Backend Development  >  How to convert all letters to uppercase in php

How to convert all letters to uppercase in php

尚
Original
2020-04-28 16:39:504406browse

How to convert all letters to uppercase in php

You can use the strtoupper() function in PHP to convert all characters in a string to uppercase.

Function syntax:

strtoupper(string)

string: required. Specifies the string to be converted.

Example:

<!DOCTYPE html>
<html>
<body>
<?php
echo strtoupper("Hello WORLD!");
?> 
 
</body>
</html>

The effect is as follows:

How to convert all letters to uppercase in php

##For more related tutorials, please pay attention to

php中文网.

The above is the detailed content of How to convert all letters to uppercase in php. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn