note 19908 deleted from function.sort by googleguy
| From: | googleguy@php.net | Date: | Tue, 22 Oct 2013 09:01:12 +0000 |
| Subject: | note 19908 deleted from function.sort by googleguy | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-196825@lists.php.net to get a copy of this message | ||
Note Submitter:
----
If you want to sort an array according to your locale do the following:
(de_DE as example)
setlocale("LC_ALL","de_DE");
usort($arraytobesorted, 'strcoll');
--ed: In PHP 4.4 and PHP 5.0 you can do:
setlocale("LC_ALL", "de_DE");
sort($arraytobesorted, SORT_LOCALE_STRNG);