I have data that is in a multi-dimensional array that has a date attached to it of the format '28-Jul-17'. I would like to sort my data in ascending or descending date order. I am able to sort my multi-dimensional array, but I do not know how to sort the data out. My question is, which flag should I use to in this function to get the result that I require? At the moment I am using SORT_DESC or SORT ASC and this does not sort my date out in chronological order.
I am using the following:
array_multisort($fieldOfInterest, SORT_DESC , $arrayOfDictionary);
Sorting type flags:
SORT_REGULAR - compare items normally (don't change types)
SORT_NUMERIC - compare items numerically
SORT_STRING - compare items as strings
SORT_LOCALE_STRING - compare items as strings, based on the current locale. It uses the locale, which can be changed using setlocale()
SORT_NATURAL