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

How to convert uppercase to lowercase in php

藏色散人
藏色散人Original
2020-07-29 10:04:504137browse

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;
?>

Output result:

i want to fly

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!

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