How to use php strtoupper function

藏色散人
Release: 2023-04-04 22:20:01
Original
4305 people have browsed it

PHP strtoupper function is used to convert strings to uppercase. The strtoupper syntax is strtoupper(string), and the parameter string is required and specifies the string to be converted.

How to use php strtoupper function

How to use strtoupper function?

Function: Convert all characters to uppercase

Syntax:

strtoupper(string)
Copy after login

Parameters:

string Required, specifies the string to be converted

Description: The strtoupper() function converts a string to uppercase. This function is binary safe.

php strtoupper() function usage example 1:

<?php
$i = "hello world";
$j = strtoupper($i);
echo $j;
?>
Copy after login

Output:

HELLO WORLD
Copy after login

php strtoupper() function usage example 2:

<?php
$i = "I&#39;m study in php.cn";
$j = strtoupper($i);
echo $j;
?>
Copy after login

Output:

I&#39;M STUDY IN PHP.CN
Copy after login

This article is an introduction to the PHP strtoupper function. I hope it will be helpful to friends in need!

The above is the detailed content of How to use php strtoupper function. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template