The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Home › Forums › Back End › [Solved] Reverse order of array
I’m trying to display posts in reverse order from newest to oldest. I’ve got the following array filled with timestamped dates:
I’m using array_reverse to try to flip the order, but it doesn’t seem to work:
Am I not doing this right?
How about this:
That was it. Thanks.
I realise this was solved already, but wouldn’t it have been more efficient to sort the replies when executing the query?
That will select all the posts and order by the most recent timestamp (i.e. newest to oldest)?