Re: Needing help hear
| From: | Marc E. Brinkmann) | Date: | Tue, 15 May 2001 09:32:02 +0000 |
| Subject: | Re: Needing help hear | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-52820@lists.php.net to get a copy of this message | ||
Hi Richard,
Richard> I am trying to pull all the e-mail out of the database and put them
Richard> in a format like this me@domain.com,me2@domain.com,me3@domain.com
Richard> this is what I have now but I don't seam to be going in the right
Richard> direction. Could somebody give me a hint
Richard> $sql = "SELECT email FROM customers";
Richard> $result = mysql_query($sql);
Richard> $num_rows = mysql_num_rows($result);
Richard> while ($myrow = mysql_fetch_array($result)){
Richard> $recipient=$myrow["email"] . ",";
Richard> }
This way you'll only get the last recipient.
Try:
$recipient .= $myrow["email"] . ",";
-----------------------
EnjoY,
Adaran (vielmailer@adaran.net)
check http://www.adaran.net