PHP Tutorial PHP Advanced PHP Resources
Python Java C++ C C# PHP R SQL DS Algo InterviewQ

PHP - String strtolower() Function

The PHP String strtolower() function returns the string with all characters of the specified string in lowercase. Any symbol, space, special character or number in the string is ignored while applying this function. Only Alphabets are converted.




string Required. Specify the string to convert

Return Value

Returns the lowercased version of the specified string.


In the example below, strtolower() function returns a string containing all characters of the specified string MyString in lowercase.

$MyString = "HeLLo John!";
$NewString = strtolower($MyString);

echo $NewString."\n";

The output of the above code will be:

hello john!

❮ PHP String functions