The PHP strtolower()
function is used to convert string characters to lowercase.
The function accepts a string
to be converted and returns a string
with all lowercase characters:
strtolower(string $string): string
This function doesnβt affect any numeric or special character in the string.
Here are some examples of using the function:
$str = "Nathan Sebhastian";
// π convert to lowercase
$str = strtolower($str);
// π nathan sebhastian
echo $str;
$str = "JACK is a SOFTware DEVeloper";
// π convert to lowercase
$str = strtolower($str);
// π jack is a software developer
echo $str;
The function reference is documented at: https://www.php.net/manual/en/function.strtolower.php