note 15074 deleted from function.sort by derick

From: Date: Wed, 31 Aug 2005 10:37:05 +0000
Subject: note 15074 deleted from function.sort by derick
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-94494@lists.php.net to get a copy of this message
Note Submitter: RunMaster at gmx dot de ---- E ~ É topic sort() sorts in ASCII where É is higher than E (even as Z) so there is no way without a workaround. My suggestion is to try out the following: str_replace() all the É and other special chars with an E or any similar fitting char and an identification string just like ++, which should not appear in any of the strings used in the array ("E++somethingelseinfrench"). sort() your array and str_replace() its elements again, this time replace E++ with É. This should bring all your És just after E, before F... This is not the best solution, but should help a bit.

« previous php.notes (#94494) next »