In PHP, we can use the function mb_strtolower() to change a given string into lower case. It returns strings with all alphabetic characters converted to lowercase characters.
string mb_strtolower(str $string, str $encoding)
mb_strtolower() accepts two parameters: $string and $encoding.
$string− The string being lowercased, returns strings with all alphabetic characters converted to lowercase characters.
$encoding− This parameter is the character encoding. If it is absent or null, then the internal character encoding value will be used.
string with all alphabetic characters converted to lowercase.
<?php // Upper and lower case characters are used to // convert in lower case using mb_strtoloower function $string = "Hello World!, Welcome to ONLINE tutorials"; // It gives the output in lower case $string = mb_strtolower($string); echo $string; ?>
It will conver all the characters in the given string to its lower case.
hello world! welcome to online tutorials