We're currently calling a list of categories in Magento and sorting them alphabetically using the below...
ksort($categories, SORT_STRING);
The problem is that PHP sorts lowercase instances after all uppercase instances for example, they would be ordered like thus:-
Apple
Banana
Cherry
apple
banana
cherry
Rather than...
Apple
apple
Banana
banana
Cherry
cherry
Please could anyone advise how we can ignore the case sensitivity when sorting with PHP. We've played around with so many sort functions including sort, ksort, asort, usort and natsort now and not achieved what we're after.
Any help appreciated, thanks in advance.