Home >Backend Development >PHP Tutorial >The function strtolower() that converts php strings to lowercase
Example
Convert all characters to lowercase:
<?php echo strtolower("Hello WORLD."); ?>
Definition and usage
strtolower() function converts a string to lowercase.
Note: This function is binary safe.
Related functions:
strtoupper() - Convert the string to uppercase
lcfirst() - Convert the string to uppercase Convert the first character in the string to lowercase
ucfirst() - Convert the first character in the string to uppercase
ucwords() - Convert the first character in the string to uppercase Convert the first character of each word in the string to uppercase
Syntax
strtolower(string)
Parameters | Description |
string | Required. Specifies the string to be converted. |
Technical details
Return value: | Returns the string converted to lowercase. |
PHP version: | 4+ |
Example:
<?php $str = "I want To FLY"; $str = strtolower($str); echo $str; //by www.jbxue.com ?>Output:
i want to fly
The above is the detailed content of The function strtolower() that converts php strings to lowercase. For more information, please follow other related articles on the PHP Chinese website!