Re: Doubling up...
| From: | John W. Holmes | Date: | Sun, 06 Jun 2004 21:33:14 +0000 |
| Subject: | Re: Doubling up... | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-187758@lists.php.net to get a copy of this message | ||
rjones@email.unc.edu wrote:
Using the code below, im getting a problem where it is printing out TWO of each field value instead of one... [snip]
while($row = mysql_fetch_array($result)){fetch_array returns an array where the indexes are numeric and where they are the column names. So $row has four elements in it. You're seeing exactly what should happen. Use fetch_row() or fetch_assoc() instead. -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals – www.phparch.com