PHP Manual
Prev |  | Next

# ucwords

ucwords -- Uppercase the first character of each word in a string

## Description

`string ucwords`(string str);

Capitalizes the first character of each word in `str` if that character is alphabetic.

Example 1. ucwords() example
      1
      2 $text = "mary had a little lamb and she loved it so.";
      3 $text = ucwords($text); // $text is now: Mary Had A Little Lamb And She Loved It So.
      4

See also strtoupper(), strtolower() and ucfirst().

Prev | Home | Next
ucfirst | Up | Sybase functions