PHP Tutorial - PHP strtolower() Function






Definition

The strtolower() function takes string and returns that string in lowercase characters.

Syntax

PHP strtolower() Function has the following syntax.

string strtolower ( string str )

Parameter

str is the string value we want to convert.

Return

PHP strtolower() Function returns the string in lowercase.

Example

Convert string to lowercase


<?PHP
$string = "PHP from java2s.com"; 
$a = strtolower($string); 
print($a);
?>

The code above generates the following result.