I want to access all the content of an array backwards. I've come up with two possibilities.
One, I could start a loop counting backwards from the last entry in the array... but I don't know how to get the number of elements in an array.
Two, I could take all of the elements in an array and transfer them backwards to another array. Then start at one.
Any other idea's? What I have is an array where array is a username and array is a message...then array is a username, and array is the next message... I want to display the second to last array element, then the last...then the 4th to last...then the 3rd to last..etc... so all the new messages are on top.
Edit: Better yet...how do you fopen a file to add to the top...but not replace anything?