strange ubrupt end in my code

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

Alphamonkey
Forum Newbie
Posts: 8
Joined: Mon Sep 01, 2008 4:05 pm

Re: strange ubrupt end in my code

Post by Alphamonkey »

SOLVED
OMG, that is the funniest thing I have seen posted lately. Grin

You do understand that when mysql_fetch_array() has already fetched the last row from the result set it will return a false value the next time it executes which the or die() will use to terminate program execution?

Remove the or die() from the end of the mysql_fetch_array(). The purpose of the while() statement is to loop until the mysql_fetch_array() returns a false value.
in case anyone was curious
User avatar
starram
Forum Commoner
Posts: 58
Joined: Thu Apr 10, 2008 1:27 am
Location: India
Contact:

Re: strange ubrupt end in my code

Post by starram »

Hey, First remove those div tags and if problem still persist then replace the while condition whit this.

while($row = mysql_fetch_assoc($result))
Post Reply