Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

PHP ucwords() Function

PHP ucwords() Function

PHP String Reference Manual PHP String Reference Manual

Example

Convert the first character of each word to uppercase:

Run Example »


Definition and Usage

The ucwords() function converts the first character of each word in a string to uppercase.

**Note:** This function is binary-safe.

Related functions:


Syntax

ucwords(

string

)

Parameters Description
string Required. Specifies the string to convert.

Technical Details

Return Value: Returns the converted string.
PHP Version: 4+

PHP String Reference Manual PHP String Reference Manual