English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
PHP String Character String Function Manual
The ucwords() function is used to convert the first letter of each word in the string to uppercase.
ucwords(string)
Convert the first letter of each word in the string to uppercase
It returns the modified string
Serial Number | Parameter and Description |
---|---|
1 | string Specify the string to be converted |
Try the following example, convert the first letter of each word to uppercase
<?php //Convert the first letter of each word to uppercase echo ucwords("can i help you?"); ?>Test and See‹/›
Output Result
Can I Help You?