<?php
echo strtolower("WORLD IS BEAUTIFUL");
?>
Output
world is beautiful
In the above code example, we have converted all the characters of String "WORLD IS BEAUTIFUL" to lowercase. The PHP function strtolower() will convert all the charters of the string to lowercase. It takes the string as a parameter and returns the same string in the lowercase format.
strtolower($str)
More Examples
Below are the code examples that can help you to better understand the functionality of strtolower() function.
<?php
echo strtolower("We are ProgRammers");
// -> we are programmers
echo strtolower("make the WORLD a Beautiful Place");
// -> make the world a beautiful place
echo strtolower("Hello world");
// -> hello world
?>
0 Comments