Home >Backend Development >PHP Problem >How to convert lowercase letters to uppercase in php

How to convert lowercase letters to uppercase in php

王林
王林Original
2020-08-18 17:10:274357browse

php method to convert lowercase letters to uppercase: You can use the strtoupper() function to achieve this. The strtoupper() function can convert a string to uppercase and return the converted string, such as: [strtoupper("Hello WORLD!")].

How to convert lowercase letters to uppercase in php

strtoupper() function converts a string to uppercase and returns the string converted to uppercase.

(Recommended tutorial: php graphic tutorial)

Grammar:

strtoupper(string)

(Recommended learning video: php video tutorial )

Example:

<?php
echo strtoupper("Hello WORLD!");
?>

Output result:

HELLO WORLD!

The above is the detailed content of How to convert lowercase 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

Related articles

See more