How can I re-arrange a array of objects like this:
[495] => stdClass Object
(
[date] => 2009-10-31 18:24:09
...
)
[
I wanted to expand on arnaud576875 and Michael Irigoyen.
Same issue with object containing dateTime with Symphony.
I coudn't use $a['date'] because it was not an key array.
usort($verifications, function($a, $b) {
return $a->getDate()->format('U') - $b->getDate()->format('U');
});
This solved my problem