note 23910 deleted from function.ucwords by dams
| From: | dams@php.net | Date: | Wed, 31 Jul 2002 19:15:29 +0000 |
| Subject: | note 23910 deleted from function.ucwords by dams | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-34078@lists.php.net to get a copy of this message | ||
I use the following in place of ucwords() when I need capitalization despite unpredictable
punctuation.
$text = preg_replace(
'/([^A-Za-z][A-Za-z])/e',
'strtoupper("$1")',
$text
);