Saturday, February 7, 2026
HomeLanguagesHow to convert uppercase string to lowercase using PHP ?

How to convert uppercase string to lowercase using PHP ?

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:

neveropen

Example 2:

PHP




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


Output:

neveropen for neveropen

Example 3:

PHP




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


Output:

hello neveropen have a wonderful day
Dominic
Dominichttp://wardslaus.com
infosec,malicious & dos attacks generator, boot rom exploit philanthropist , wild hacker , game developer,
RELATED ARTICLES

Most Popular

Dominic
32491 POSTS0 COMMENTS
Milvus
126 POSTS0 COMMENTS
Nango Kala
6863 POSTS0 COMMENTS
Nicole Veronica
11987 POSTS0 COMMENTS
Nokonwaba Nkukhwana
12076 POSTS0 COMMENTS
Shaida Kate Naidoo
6996 POSTS0 COMMENTS
Ted Musemwa
7238 POSTS0 COMMENTS
Thapelo Manthata
6947 POSTS0 COMMENTS
Umr Jansen
6933 POSTS0 COMMENTS