php ucwords() function converts the first character of each word in the string to uppercase. This article introduces the basic usage and examples of the php ucwords() function to coders. Interested coders can refer to it.
Definition and usage
ucwords() function converts the first character of each word in the string to uppercase.
Note: This function is binary safe.
Related functions:
lcfirst() - Convert the first character in the string to lowercase
strtolower() - Convert the string to lowercase
strtoupper() - Convert the string to uppercase
ucfirst() - Convert the first character in the string to uppercase
Syntax ucwords(string)
Technical details
Example
Convert the first character of each word to uppercase:
< ?phpecho ucwords("hello world");?>
The above php ucwords() function converts the first character of each word in the string to uppercase (implementation code) is what I share with you The entire content is here, I hope it can give everyone a reference, and I also hope everyone will support the PHP Chinese website.
For more php ucwords() function, convert the first character of each word in the string to uppercase (implementation code), please pay attention to the PHP Chinese website for related articles!