note 116729 added to function.ucwords
| From: | Florian | Date: | Fri, 20 Feb 2015 08:03:11 +0000 |
| Subject: | note 116729 added to function.ucwords | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-201764@lists.php.net to get a copy of this message | ||
to convert first letters in a firstname like: "jean-pierre" to "Jean-Pierre":
I simply replace the '-' with a vertical tabulation, because the ucwords() function
replace the letter just after it.
so, I use the sentence:
$result=str_replace(chr(11),'-',ucwords(strtolower(str_replace('-',chr(11),$firstname))));
----
Server IP: 72.52.91.14
Probable Submitter: 194.199.64.185
----
Manual Page -- http://php.net/manual/en/function.ucwords.php
Edit -- https://master.php.net/note/edit/116729
Del: integrated -- https://master.php.net/note/delete/116729/integrated
Del: useless -- https://master.php.net/note/delete/116729/useless
Del: bad code -- https://master.php.net/note/delete/116729/bad+code
Del: spam -- https://master.php.net/note/delete/116729/spam
Del: non-english -- https://master.php.net/note/delete/116729/non-english
Del: in docs -- https://master.php.net/note/delete/116729/in+docs
Del: other reasons-- https://master.php.net/note/delete/116729
Reject -- https://master.php.net/note/reject/116729
Search -- https://master.php.net/manage/user-notes.php