note 39795 added to function.ucwords
| From: | babel-nospamplease-sympatico-ca at rn2 dot php dot net | Date: | Wed, 11 Feb 2004 01:26:43 +0000 |
| Subject: | note 39795 added to function.ucwords | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-64983@lists.php.net to get a copy of this message | ||
Correction to the code of firewire at itsyourdomain dot com:
preg_replace_callback('/\b(\w)(\w+)?/',
create_function('$a',
'return strtoupper($a[1]) . ((sizeof($a) > 2 ) ?
strtolower($a[2]) : "");'),
'p.s.: hello.this is my string.');
Will work with punctuation as well as spaces.
----
Manual Page -- http://www.php.net/manual/en/function.ucwords.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+39795
Delete -- http://master.php.net/manage/user-notes.php?action=delete+39795&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+39795&report=yes
Search -- http://master.php.net/manage/user-notes.php