Jeremy R Irawan Jeremy R Irawan - 1 year ago 73
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.


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

Found another function at this link.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download