Doubling up...

From: Date: Sun, 06 Jun 2004 21:29:41 +0000
Subject: Doubling up...
Groups: php.general 
Request: Send a blank email to php-general+get-187757@lists.php.net to get a copy of this message
Using the code below, im getting a problem where it is printing out TWO of each field value instead of one... For example, a table like id | name | age ---------------- 1 | russ | 22 2 | jon | 23 would print out for the first row... <tr><td>1</td><td>1</td><td>russ</td><td>russ</td><td>22</td><td>22</td> </tr> any ideas on whats going wrong? THanks in advance, and thanks to all who helped out w/ my last question. answered it in a second! -------------------------------------- $query = "SELECT * FROM volunteers"; $result = mysql_query($query); while($row = mysql_fetch_array($result)){ echo '<tr>'; foreach($row as $key=>$value) { echo '<td><font size=-2 face=verdana>' . $value . '</font></td>';} echo '</tr>'; }

« previous php.general (#187757) next »