The strtolower() is one of the most popular functions of PHP, which is widely used to convert the string into lowercase. It takes a string as a parameter and converts all uppercase English character of that string to lowercase. Other characters such as numbers and special character of that string remain the same. PHP 4+ versions support this function.
Hint: Use the PHP
$string (required): This is a mandatory parameter of this function which specifies a string to convert into lowercase. In simple words – it is a string which is converted into lowercase.
It returns converted lowercase string.
You can use the PHP
strtolower() function to convert a string to lowercase. Let’s check out the following example to understand how this function actually works:
<?php $my_str = 'Learn, Share and Grow Your Coding Skills'; echo strtolower($my_str); ?>
learn, share and grow your coding skills
There are some other functions in PHP which are similar to the strtolower() function:
Related PHP functions