note 24731 added to function.ucwords
| From: | php-general at lists dot php dot net | Date: | Tue, 27 Aug 2002 11:20:59 +0000 |
| Subject: | note 24731 added to function.ucwords | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-35721@lists.php.net to get a copy of this message | ||
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!
--
http://www.php.net/manual/en/function.ucwords.php
http://master.php.net/manage/user-notes.php?action=edit+24731
http://master.php.net/manage/user-notes.php?action=delete+24731
http://master.php.net/manage/user-notes.php?action=reject+24731