I’ve finally found a rogue .php file that runs on a daily basis that essentially acts as a spell check for our product database. Most of it is no longer needed for various reasons (was created 10 years ago) so I’m trimming it. However, I don’t know much PHP (I’m mostly HTML) and this one line is bugging me:
$name = ucwords(strtolower($name));
If I’m reading this correctly, this takes product names that are in all caps and changes them to lower case. Am I on the right track?
Thanks in advance.
The
ucwordsfunction changes the first letter of all the words to uppercases. So yes, it takes a string, makes it all lower case, and then makes the first letter of each word uppercase.