I have a form w/ firstname and lastname fields. I am trying to convert the input to initial caps only since some users type all caps and some all lowercase. Here is what I have:
$lcUpdate = ucwords(strtolower($input));
$icUpdate = ucfirst($lcUpdate);
What I find is the first word in the string is not capitalized but the 2nd word is: e.g. mary Jane (firstname). How do I get M in mary capitalized as well? Any help would be greatly appreciated.