I used sort($array, SORT_STRING) but the problem is that it doesn't preserve the keys.
What's the best way to sort an array of dates in php?
You could always implement your own sorting function, because you would know exactly what was done to the elements.
Selection sort or Insertion sort are easy to implement and the overhead is not large as long as the array isn't too big.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment