PHP lcfirst() function with example

PHP lcfirst() work: Here, we will find out about the lcfirst() work with an example.

PHP lcfirst() work

lcfirst() work is a string capacity, it is utilized to change over the first character to lowercase. It acknowledges string and returns a string with a first lowercase character.

Syntax:

    lcfirst(string);

Example:

    Input: "THIS is MY computer!"
    Output: "tHIS is MY computer!"

PHP Code:

<?PHP
    $str = "THIS is MY computer!";
    
    echo (lcfirst($str));
?>

Output:

tHIS is MY computer!

Leave a Comment

error: Alert: Content is protected!!