I'm using a compare function in conjunction with usort, to sort my multi-dimensional array - which works fine except for one thing....All values that start with an upper case character get precedence over lower case charaters, why?
Example of a sorted array:
Apple
Banana
Orange
apricot
lemon
I want it to sort it like this:
Apple
apricot
Banana
lemon
Orange
This is my comparison function:
function cmp($a,$b)
{
if ($a[fruit] == $b[fruit]) return 0; return ($a[fruit] < $b[fruit]) ? -1 : 1;
}