I have this array filled with data from a database
$collectTable1 = array( 'errand' => $interest->errand_id,
'timestamp' => $interest->timestamp,
'type' => $interest->type,
'amount' => $interest->amount
);
$collector[] = $collectTable1;
And i want to rsort the timestamp, like this
$sortTime = rsort($collectedData['timestamp']);
I tried this, and i get this output
function timesort($a, $b) { return (intval($a['timestamp']) > intval($b['timestamp'])); } usort($collector, "timesort");
2017-12-01 10:53:26
I tought i would get from the descending date point? Something like 2018-09-04 12:32:16.
My timestamp also contains both unixtimestamp and regular dates like this " 2017-12-01 10:53:26"