PHP strtolower() Function
The PHP 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.
Note: Alphabet is determined by the current locale. For instance, in the default "C" locale characters such as umlaut-a (ä) will not be converted.
Note: This function is binary-safe.
Syntax
strtolower(string)
Parameters
string |
Required. Specify the string to convert |
Return Value
Returns the lowercased version of the specified string.
Example:
The example below shows the usage of strtolower() function.
<?php $MyString = "HeLLo John!"; $NewString = strtolower($MyString); echo $MyString."\n"; echo $NewString."\n"; ?>
The output of the above code will be:
HeLLo John! hello john!
❮ PHP String Reference