How to convert the first letter of a String to lowercase in PHP
In PHP, lcfirst(string $string)
is the inbuilt function to convert the first letter of a String to lowercase. And lcfirst(string $string)
function is available from PHP 5.3.0+ version.
Similar Post: How to capitalize the first letter of a String in PHP
<?php
$str1 = 'Ramayan';
$str1 = lcfirst($str1);
echo $str1; // ramayan
$str2 = 'GEETA';
$str2 = lcfirst($str2);
echo $str2; // gEETA
$str3 = '@Ramayan';
$str3 = lcfirst($str3);
echo $str3; // @Ramayan
?>