$string = "this is a sample string"; $convertedString = ucwords($string); echo $convertedString;Output: "This Is A Sample String" This function is part of the JString package library in Joomla, which provides functions for working with strings in Joomla extensions and templates. The JString package includes functions for manipulating strings, such as converting case, truncating, substituting, and searching.