note 24731 deleted from function.ucwords by googleguy
| From: | googleguy@php.net | Date: | Tue, 22 Oct 2013 09:03:37 +0000 |
| Subject: | note 24731 deleted from function.ucwords by googleguy | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-196867@lists.php.net to get a copy of this message | ||
Note Submitter:
----
Beware of language when using this function to collate personal names! This may not work with some
languages and this depends on the current locale!
So it's best to simply use strtoupper() or strtolower(strtoupper()) to collate names for
searches in a database. Avoid using strtolower() directly, as it won't collate some characters
like the german 'ß' into 'ss'.
Capitalizing names is very language dependant: don't do it on address fields such as city
names. Prefer uppercasing, or keep the original case if the string must be displayed to a user!