note 102887 deleted from array.sorting by danbrown
| From: | danbrown@php.net | Date: | Sat, 12 Mar 2011 18:37:46 +0000 |
| Subject: | note 102887 deleted from array.sorting by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-177824@lists.php.net to get a copy of this message | ||
Note Submitter: Anonymous
----
Another way to do a case case-insensitive sort by key would simply be:
<?php
uksort($array, 'strcasecmp');
?>
Since strcasecmp is already predefined in php it saves you the trouble to actually write the
comparison function yourself.