1

I want to sort an array based on these rules : Case insensitive , alphabetical characters first, numerics second and other characters last based on ASCII order. This array : "toto" "tutu" "4234" "_hop XXX" "##" "1948372" "AhAhAh" should result in :

AhAhAh
toto
tutu
XXX
1948372
4234
#
_hop
Crisan Raoul
  • 103
  • 2
  • 13
  • You can define your own order using `usort` http://php.net/manual/en/function.usort.php – Daniel Dudas Apr 05 '16 at 15:21
  • this might help you http://stackoverflow.com/questions/17473879/sort-array-digits-special-chars-letters – urfusion Apr 05 '16 at 15:37
  • Is it fit in any existing algorithm?? If not then make it own using `usort`. The usort() function sorts an array using a user-defined comparison function. – Murad Hasan Apr 05 '16 at 16:15

0 Answers0