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

How to convert uppercase to lowercase in php

藏色散人
Release: 2023-03-03 13:06:01
Original
4221 people have browsed it

php method to convert uppercase to lowercase: first create a PHP sample file; then enter the conversion content as "$str = strtolower($str);"; finally use echo to output the converted result.

How to convert uppercase to lowercase in php

Recommended: "PHP Tutorial"

Convert the string to lowercase

strtolower(): This function converts all the characters of the incoming string parameter into lowercase and puts the string back in small definite form.

Example:

<?php
    $str = "I want To FLY";
    $str = strtolower($str);
    echo $str;
?>
Copy after login

Output result:

i want to fly
Copy after login

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

Related labels:
php
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
Latest Issues
php data acquisition?
From 1970-01-01 08:00:00
0
0
0
PHP extension intl
From 1970-01-01 08:00:00
0
0
0
How to learn php well
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template