Data output

From: Date: Thu, 09 May 2002 21:05:40 +0000
Subject: Data output
Groups: php.windows 
Request: Send a blank email to php-windows+get-13669@lists.php.net to get a copy of this message
After I output data from a query with a for() loop, It seems like I cannot reuse the array from the query any more. Do I have to requery the database for the same info so that I can add up the database columns? <?PHP $bgcolor = "Silver"; $bgcount="0"; for ($i=0; $i < 10; $i++ ) { if ($bgcount == 1) { $bgcolor = "White"; $bgcount = $bgcount + 1; } else { $bgcount = "0"; $bgcolor="EFEFEF"; } $rows = mysql_fetch_array($result); ?> OUTPUT DATA HERE <?PHP } ?> After this has run, when I try to run another for() loop on the same $result using the $rows variable it doesn't work. Any ideas? Matt Babineau Freelance Internet Developer ----------------------------------------- e: <mailto:mbabineau@illuminatistudios.com> mbabineau@illuminatistudios.com p: 603.943.4237 w: <http://www.illuminatistudios.com/> http://www.illuminatistudios.com

« previous php.windows (#13669) next »