Jeremy R Irawan Jeremy R Irawan - 5 months ago 12x
PHP Question

PHP returning a string with the first char of every words in lowercase

There is already a function in PHP called ucwords which does just the opposite of what i need.

Is there such php library called lcwords? where instead of capitalizing the first of every words it converts them to lower case.


$string = "THIS IS SOME TEXT";
$string=explode(" ",$string);
    $string[$i] = lcfirst($string[$i]);
echo implode(" ",$string);

Found another function at this link.