I have an array of object with dynamic date and days. I want to sort array with days keys in php in the order of the days.
Given input like this:
array(
[17-08-2017] => stdClass Object
(
[days] => Thu
)
[21-08-2017] => stdClass Object
(
[days] => Mon
)
[22-08-2017] => stdClass Object
(
[days] => Tue
)
[23-08-2017] => stdClass Object
(
[days] => Wed
)
);
I want result like this:
array(
[21-08-2017] => stdClass Object
(
[days] => Mon
)
[22-08-2017] => stdClass Object
(
[days] => Tue
)
[23-08-2017] => stdClass Object
(
[days] => Wed
)
[17-08-2017] => stdClass Object
(
[days] => Thu
)
);
I know this is the stupid idea but how can I do this. Please help me.