how to write while !eof

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
shaky
Forum Newbie
Posts: 7
Joined: Mon Jan 05, 2004 2:06 am

how to write while !eof

Post by shaky »

I want to retrieve data from database, how do i want to check
"while not eof"..

i'm using mysql_fetch_array($result);
fastfingertips
Forum Contributor
Posts: 242
Joined: Sun Dec 28, 2003 1:40 am
Contact:

Post by fastfingertips »

Is simple

while($row=mysql_fetch_array($result))
{
$customer=$row['customer']
}
Gen-ik
DevNet Resident
Posts: 1059
Joined: Mon Aug 12, 2002 7:08 pm
Location: London. UK.

Post by Gen-ik »

You can also get objects like this...

Code: Select all

while($obj = mysql_fetch_object($result))
{
    $customer = $obj->customer;
}
Post Reply