Home  >  Article  >  Backend Development  >  How to convert English lowercase to uppercase in php

How to convert English lowercase to uppercase in php

王林
王林Original
2020-08-07 11:44:472489browse

How to convert English lowercase to uppercase in php: You can use the php built-in function strtoupper() function to achieve this. This function can convert all lowercase characters in the specified string to uppercase and return the string converted to uppercase, such as: [strtoupper("Hello WORLD!")].

How to convert English lowercase to uppercase in php

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

(Recommended tutorial: php graphic tutorial)

Syntax:

strtoupper(string)

Parameters:

string Required. Specifies the string to be converted.

(Learning video recommendation: Introduction to Programming)

Code example:

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

Output result:

HELLO WORLD!

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!

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