In this article, you will learn how to convert the first letter of the string to lowercase. The PHP LCFIRST() function converts the first letter of the given string to lowercase. This function is very useful in some scenarios for the developers.
What is the syntax of the LCFIRST()function in php?
lcfirst(string)
Parameter | Description |
---|---|
string | Required. Specifies the string to convert |
examples of the LCFIRST() function
Example 1. In this example, we convert the first character of “Hello” to lowercase.
<?php
echo lcfirst("Hello world!");
?>