Definition
The ucwords() function is used to convert the first character of each word in a string to uppercase.
Syntax
ucwords(string, delimiters)
Parameters
Parameter | Description |
---|---|
string |
Required. Specifies the string to convert. |
delimiters |
Optional. Specifies the word separator character. |
Example
<?php
echo ucwords("welcome to php!");