Programming Tips - PHP: convert a string to title case

Date: 2018sep27 Language: php Q. PHP: convert a string to title case (First Letter Of Words Uppercase and Rest Lowercase) A.
function toTitleCase($s) { return ucwords(strtolower($s)); }