Re: Really simple loop problem..

From: Date: Wed, 11 Oct 2000 19:12:12 +0000
Subject: Re: Really simple loop problem..
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-19672@lists.php.net to get a copy of this message
What's up Chad: Instead of your do while statement, I'd do stuff like this: while ($row = mysql_fetch_array($getstats) ) { $TEMP = $row["REGION"]; if (in_array($TEMP, $regionarray)) { echo $row["REGION"]; } } You can even cut out the second line, to save time and memory: while ($row = mysql_fetch_array($getstats) ) { if (in_array($row["REGION"], $regionarray)) { echo $row["REGION"]; } } Enjoy, --Dan -- T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y More than just answers. Solutions. (SM) http://www.analysisandsolutions.com/ 4015 7 Av #4, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409

« previous php.general (#19672) next »