note 106243 added to function.sort
| From: | ajanata at gmail dot com | Date: | Fri, 21 Oct 2011 04:13:09 +0000 |
| Subject: | note 106243 added to function.sort | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-184038@lists.php.net to get a copy of this message | ||
This took me longer than it should have to figure out, but if you want the behavior of sort($array,
SORT_STRING) (that is, re-indexing the array unlike natcasesort) in a case-insensitive manner, it is
a simple matter of doing usort($array, strcasecmp).
----
Server IP: 69.147.83.197
Probable Submitter: 98.248.33.90
----
Manual Page -- http://www.php.net/manual/en/function.sort.php
Edit -- https://master.php.net/note/edit/106243
Del: integrated -- https://master.php.net/note/delete/106243/integrated
Del: useless -- https://master.php.net/note/delete/106243/useless
Del: bad code -- https://master.php.net/note/delete/106243/bad+code
Del: spam -- https://master.php.net/note/delete/106243/spam
Del: non-english -- https://master.php.net/note/delete/106243/non-english
Del: in docs -- https://master.php.net/note/delete/106243/in+docs
Del: other reasons-- https://master.php.net/note/delete/106243
Reject -- https://master.php.net/note/reject/106243
Search -- https://master.php.net/manage/user-notes.php