This can be achieved with the following code.
usort($variable, function ($a, $b) { if ($a['timestamp'] == $b['timestamp']) { return 0; } return ($a['timestamp'] < $b['timestamp']) ? 1 : -1;
});
This will sort the array of variable $, assuming the timestamp is in Variable $ [0] ['Timestamp']; Variable $ [0] ['Timestamp']; etc.
Davinder snehi
source share