Re: problem with a while loop

From: Date: Thu, 06 May 2004 19:34:22 +0000
Subject: Re: problem with a while loop
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-185552@lists.php.net to get a copy of this message
From: "John Nichel" <john@kegworks.com> > > $i =0; > > > > while ($i < $num_results) { > > > > $row = mysql_fetch_array($result); > > > > $producer = $row["PRODUCE"]; > <snip> > > Try changing the above from.... > > while ($i < $num_results) { > > $row = mysql_fetch_array($result); > > To.... > > while ( $row = mysql_fetch_array($result) ) { Same thing, really. It's a little more efficient than keeping a count, but not the cause of any of the problems. :) ---John Holmes...

« previous php.general (#185552) next »