|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-04-25 14:29 UTC] sniper@php.net
[2005-04-26 20:58 UTC] asgl at email dot it
[2005-04-26 21:53 UTC] tony2001@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 21:00:02 2025 UTC |
Description: ------------ When I order an array with the asort() function, the words that begin with an uppercase letter are ordered before the others. I think a a case-insensitive would be useful. In fact, in the alphabet there isn't any difference between "A" and "a". Example: <?php $array = array("cat", "Dog", "Mice"); asort($array); print_r($array); ?> This returns: Array ( [1] => Dog [2] => Mice [0] => cat ) It must return, instead Array ( [0] => cat [1] => Dog [2] => Mice ) because "cat" < "Dog" < "Mice". PS: excuse me for my bad English :)