Tuesday, 26 July 2016

Make first letter uppercase and the rest lowercase in a string

This will capitalize all word's first letters, and letters immediately after an apostrophe. It will make all other letters lowercase. It should work for you:
str_replace('\' ', '\'', ucwords(str_replace('\'', '\' ', strtolower($last_name))));




Make first letter uppercase and the rest lowercase in a string

No comments:

Post a Comment