PHP strtolower() function for lowercase string
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
More PHP tutorials
See allPHP
PHP form validation basic example
Dec 22, 2022
PHP
PHP validate email address (with code examples)
Dec 22, 2022
PHP
How to redirect using PHP with code examples
Dec 22, 2022
PHP
Handling form data using PHP (GET and POST)
Dec 21, 2022
PHP
How to fix Wordpress PHP error missing MySQL extension
Dec 21, 2022