Sorry to post on such an old thread, but I was looking for the answer to this same question and Google gave me this thread... so I'd like to post the solution I made so that people in the future who Google the question will find it also.
function acasesort($array)
{
//You provide $array, which has Unsorted keys, Unsorted values
$revarr = array_flip($array); //Unsorted values, Unsorted keys
natcasesort($array); //Meaningless keys, Sorted values
$newarr=array();
foreach($array as $value) //Loop through the sorted values
{
$newarr[$revarr[$value]] = $value;
//The keys of $newarr are the values of $revarr, which are the original keys.
//The values of $newarr are the original values, sorted with natcasesort.
}
return $newarr;
}
How it works: The natcasesort splits up the keys and the values, but the foreach puts them back together by looking the values' respective keys in $revarr.
Maybe that's a bad explanation, but I tested the function and it does work, so happy sorting!