Home / PHP Tips Generated By ChatGPT / Converting a String to Title Case in PHP Use ucwords() to capitalize the first letter of each word in a string. Source Code echo ucwords("hello world"); // Outputs: Hello World