Uppercase the first character of each word in a string using PHP 2009-10-20 33 words - 1 min read You can use “ucwords()” to uppercase the first character of each word in a string. e.g. 1 2 3 $myVar = 'this is a test!'; $myVar = ucwords($myVar); // This Is A Test!