PHP strtolower() Function (original) (raw)
Last Updated : 11 Jul, 2025
The **strtolower() function is used to convert a string into lowercase.
**Syntax:
_string strtolower( $string )
**Parameters:
The only parameter to this function is a string that is to be converted to lower-case.
**Return value:
This function returns a string in which all the alphabets are lower-case.
**Examples:
**Input: $str = "GeeksForGeeks"
strtolower($str)
**Output: geeksforgeeks
**Input: str="goingBACKheSAWTHIS123str = "going BACK he SAW THIS 123str="goingBACKheSAWTHIS123#%"
strtolower($str)
**Output: going back he saw this 123$#%
Below programs illustrate the strtolower() function in PHP:
**Example 1:
PHP `
resStr=strtolower(resStr = strtolower(resStr=strtolower(str); print_r($resStr); ?>`
**Output:
geeksforgeeks
**Example 2:
PHP `
str="goingBACKheSAWTHIS123str = "going BACK he SAW THIS 123str="goingBACKheSAWTHIS123#%"; // String converted to lower case resStr=strtolower(resStr = strtolower(resStr=strtolower(str); print_r($resStr); ?>`
**Output:
going back he saw this 123$#%
PHP is a server-side scripting language designed specifically for web development. You can learn PHP from the ground up by following this PHP Tutorial and PHP Examples.