Open In App
Related Articles

How to convert uppercase string to lowercase using PHP ?

Improve
Improve
Improve
Like Article
Like
Save Article
Save
Report issue
Report

The best way to convert uppercase string to lowercase in PHP is by using the strtolower() function. It takes the string as the input and converts it’s all characters to the lower case and returns the string value.

Syntax:

string strtolower( $string )

Return value: It returns the string converted into lower string.

Example 1:

PHP

<?php
  echo strtolower("GeeksForGeeks")
?>

                    
Output:
geeksforgeeks

Example 2:

PHP

<?php
    $str = "Geeks For Geeks";
    $lowerStr = strtolower($str);
    echo $lowerStr
?>

                    

Output:
geeks for geeks

Example 3:

PHP

<?php
    $str = "HelLo GeeKs hAve A wonDERful DaY";
    echo strtolower($str);
?>

                    

Output:
hello geeks have a wonderful day


Last Updated : 19 May, 2021
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads