ucwords

(PHP3 >= 3.0.3, PHP4 )

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.

Példa 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 
  4                         // Lamb And She Loved It So.
  5       

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