How to INSERT entry from top to bottom?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
shou0630
Forum Newbie
Posts: 3
Joined: Sun Nov 22, 2009 2:35 pm

How to INSERT entry from top to bottom?

Post by shou0630 »

i got:
peter
john
now i insert an entry,it looks like
peter
john
tom
I want it like
tom
peter
john
Every time i insert an entry it goes to top not bottom or make it displayed that way
Last edited by shou0630 on Sun Nov 29, 2009 3:02 pm, edited 1 time in total.
AlanG
Forum Contributor
Posts: 136
Joined: Wed Jun 10, 2009 1:03 am

Re: How to INSERT entry from top to bottom?

Post by AlanG »

shou0630 wrote:I want the last entry on top,OR displayed as last entry on top,how i do that?
Hmm secretive... lol Any chance of more information? Where are you looking to display the entries? Is this in a database manager (such as PHPMyAdmin) or are you fetching the data to the screen. Also, what determines the last entry? Is there a timestamp or id?

You should take a look at this comparison of array sorting functions.
Post Reply