How to move record in PHP?

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
cnnabc
Forum Newbie
Posts: 3
Joined: Fri Feb 29, 2008 3:02 am

How to move record in PHP?

Post by cnnabc »

I want to move record next and previous record in PHP?
Does any function to make it?
In ASP, it use "movenext" ? any idea? Thanks your help.
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Re: How to move record in PHP?

Post by Christopher »

Are you working with a database? Which library are you using? Usually in PHP you just keep fetching rows until null is returned.

Code: Select all

while ($row = mysql_fetch($result)) {
     // do something with $row
}
(#10850)
Post Reply