PHP strtolower() function

The strtolower() function convert all alphabetic characters to lowercase..


strtolower ( string $string ) : string


Parameter Name Descrption
$string Required, The input string.

Return Value

Returns the lowercased string.

strtolower() examples

$string = 'Test string';
$string = strtolower($string); 
echo $string;//test string

$string = 'TEST STRING';
$string = strtolower($string);  
echo $string; //test string

Related Functions

  • ucfirst(): Make a string first character uppercase
  • lcfirst(): Make a string first character lowercase
  • strtoupper(): Make a string uppercase
  • ucwords(): Uppercase the first character of each word in a string