lcfirst() function of PHP is used to converts the first character of a string to lowercase. It is an inbuilt function of PHP. The return type of this function is a string.
$string is a PHP string whose first character is converted to uppercase by this function.
<?php $str="codingtag"; $u_str=ucfirst($str); echo "Modified string is : $u_str"; ?>
Note: In case of more than one word in a string this function will convert the first character of the first word to uppercase.
<?php $str="welcome to coding tag"; $u_str=ucfirst($str); echo "Modified string is : $u_str"; ?>