I have a array:
Array
(
[ID] => Array
(
[0] => 45335
[1] => 44403
[2] => 45734
[3] => 44494
[4] => 46869
[5] => 46895
[6] => 47481
[7] => 48788
[8] => 43950
[9] => 43960
[10] => 43979
)
[post_date] => Array
(
[0] => 1373812230
[1] => 1373835652
[2] => 1373900427
[3] => 1373922044
[4] => 1374087613
[5] => 1374094854
[6] => 1374354008
[7] => 1374613236
[8] => 1373547614
[9] => 1373558434
[10] => 1373569213
)
)
How to sort value post_date on DESC ? my code here:
$indexarray = array();
array_multisort($indexarray, $indexarray["post_date"], SORT_DESC);
$indexarray[$postDate][] = array('ID' => $id, 'post_date' => $postDate). Benefit: ID and postDate form a data tuple and you can do a simpleksort.