Nothing new to you php gurus, but hope this can help somebody looking for a quick fix – great to filter user inputs in things like addresses, company names, and yes regular ole names. It utilizes PHP’s ucwords() and strtolower():
<?
$userInput1 = “MR. CAPITAL LETTERS”;
$userInput2 = “mrs. lowercase letters”;
ucwords(strtolower($userInput1)); //outputs “Mr. Capital Letters”
ucwords(strtolower($userInput2)); //outputs “Mrs. Lowercase Letters”
?>
