I have an multi-dimensional array, which has the index ['dates']
. Inside ['dates']
there is another index, and inside there is a ['date_time']
index with some data.
Presently the ordering of this part of the array is from oldest to newest date/time. I wish to reverse this so that the first element is the most recent data.
Here is a subset of the data:
array(4) {
[0]=>array(3) {
["id"]=>string(4) "1279"
["name"]=>string(13) "account_name"
["dates"]=>array(7) {
[0]=>array(3) {
["date_time"]=>string(19) "2014-11-14 09:30:03"
["follower_count"]=>string(4) "1567"
["gains_losses"]=>string(4) "1567"
}
[1]=>array(3) {
["date_time"]=>string(19) "2014-11-14 16:30:35"
["follower_count"]=>string(4) "1566"
["gains_losses"]=>string(2) "-1"
}...