i am trying to short an array by MONTH name.
[
{
"order_id":34,
"user_id":17,
"sum":65000,
"month":"May"
},
{
"order_id":32,
"user_id":19,
"sum":15000,
"month":"July"
},
{
"order_id":29,
"user_id":1,
"sum":20000,
"month":"April"
}
]
Is there any way i quickly sort this? And i need the month in name format.
I am expecting a result like below one.
[
{
"order_id":29,
"user_id":1,
"sum":20000,
"month":"April"
},
{
"order_id":34,
"user_id":17,
"sum":65000,
"month":"May"
},
{
"order_id":32,
"user_id":19,
"sum":15000,
"month":"July"
}
]
I have tried arsort, krsort, array_reverse(), but these methods are not able to short them. So looking for some other solution for this.
Thank you! (in advance)