I have a feeling there's a function that does this, somewhere, but for some reason I can't seem to get PHP to sort string arrays correctly.
Don't get me wrong, it does sort them, to an extent. The problem lies in the fact that an array containing the values "Jim", "andy", and "Zend" would be sorted like this:
Jim
Zend
andy
Obviously, it's because the a on Andy is not capitalized. I realize there is a function that effectively changes all of the array's values to either all lowercase or all uppercase and that could be used in the sort() function; however, this function, array_change_key_case() does not work--I just get call to bad function errors whenever I attempt to use it (I tried this on two different hosts).
Is there any way to get PHP to sort string arrays and not pay attention to the case?
Don't get me wrong, it does sort them, to an extent. The problem lies in the fact that an array containing the values "Jim", "andy", and "Zend" would be sorted like this:
Jim
Zend
andy
Obviously, it's because the a on Andy is not capitalized. I realize there is a function that effectively changes all of the array's values to either all lowercase or all uppercase and that could be used in the sort() function; however, this function, array_change_key_case() does not work--I just get call to bad function errors whenever I attempt to use it (I tried this on two different hosts).
Is there any way to get PHP to sort string arrays and not pay attention to the case?