0
Sort an array with special characters in PHP
Here is my array which needs to be sorted alphabetically. If i have the input: $a = [ 'a', 'u', 'ĆĄ', 's', 'Ä', 'c' ]; The output should be: a, c, Ä, s, ĆĄ, u AND NOT: a, Ä, c, ĆĄ, s, u Thanks for your feedback!
2 Answers
+ 2
Your Array is an associative array
So sort your array using asort
This will sort the array according to value but if you want to sort it according to keys use ksort.
0
https://code.sololearn.com/wSF0W7erG6Gp/?ref=app
Not working.
I change the input array.