ID:               32823
 User updated by:  asgl at email dot it
 Reported By:      asgl at email dot it
-Status:           Bogus
+Status:           Open
 Bug Type:         Arrays related
 Operating System: Windows XP Professional SP2
 PHP Version:      5.0.4
 New Comment:

I've already RTFM. I don't want to use that function because I don't
want to use the "natural order" algorithm.
In fact, I made a script which can work with both MySQL and textfiles
databases. MySQL doesn't support the natural order algorithm in
"SELECT" queries, so if I use that function with the textfile-based
database the result isn't the same.


Previous Comments:
------------------------------------------------------------------------

[2005-04-25 14:29:48] [EMAIL PROTECTED]

Something like natcasesort() perhaps? RTFM..


------------------------------------------------------------------------

[2005-04-25 13:59:44] asgl at email dot it

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 :)



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=32823&edit=1

Reply via email to