<?php print_r($dateArr); array_reverse($dateArr); print_r($dateArr);?>
Array( [0] => 2010-03-27 15:43:31 [1] => 2010-03-27 20:28:50 [2] => 2010-03-27 20:52:28)Array( [0] => 2010-03-27 15:43:31 [1] => 2010-03-27 20:28:50 [2] => 2010-03-27 20:52:28)
<?php print_r($dateArr); $dateArr = array_reverse($dateArr); print_r($dateArr);?>
SELECT * FROM posts ORDER BY timestamp DESC
I'm using array_reverse to try to flip the order, but it doesn't seem to work:
Am I not doing this right?
That will select all the posts and order by the most recent timestamp (i.e. newest to oldest)?