I have an array like
$ar =['March 2018',
'March 2018',
'November 2017',
'December 2017',
'January 2018',
'January 2018',
'February 2018'
];
I want to sort this array with month and year. But i unable to sort this array.
Expected Output: [
'November 2017',
'December 2017',
'January 2018',
'January 2018',
'February 2018',
'March 2018',
'March 2018'
];
Tried with functions like usort(), uksort()
.... but its not working
Please help me to solve this issue