PHP 5.4 introduces the useful SORT_FLAG_CASE for making any other search case insensitive. Unfortunately this isn't available in PHP 5.3 or less and so I was wondering how the following array:
array('a'=>2,'b'=>4,'A'=>1,'B'=>3);
Could be sorted into:
array('A'=>1,'a'=>2,'B'=>3,'b'=>4);
As the usual ksort() function sorts it as:
array('A'=>1,'B'=>3,'a'=>2,'b'=>4);