Re: why does my $string print in duplicate?
| From: | Rich Choy | Date: | Mon, 21 Apr 2003 16:18:44 +0000 |
| Subject: | Re: why does my $string print in duplicate? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-144660@lists.php.net to get a copy of this message | ||
Jim, I have a hunch you are calling mysql_fetch_array() with default
arguments to read your results; if this is the case you will get both a
numerically *and* associatively indexed array for each row. Try using either
mysql_fetch_row() or mysql_fetch_assoc() instead.
"Mailing" <mailing@jduncan.co.uk> wrote in message
news:Email.GUMLanmkbum@jduncan.co.uk...
> Hi
> Can anyone shed some light on this small problem gor me.
>
> I have a list of email addresses from a mysql result. The email is sent
from the script, and then the list of addresses is sent to the browser as a
courtesy to the user.
>
> I remember reading in a PHP text book that you had to do something to stop
all the data appearing twice, but can not find the information now that I
need it.
>
> Why do all the email addresses appear in duplicate and how can I stop it?
>
> Many thanks for any help
> Jim