getting the email addresses in a sendable format.
| From: | Ross | Date: | Mon, 11 Jul 2005 10:20:05 +0000 |
| Subject: | getting the email addresses in a sendable format. | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-218427@lists.php.net to get a copy of this message | ||
Hi,
I have a database of 300 email addresses retrieved with a select statement.
while ($row=mysql_fetch_array($result)) {
$email_addresses[] = $row['email'];
}
But I have having trouble assiging them to the variable $recipients. Really
what i want is to convert
$email_addresses[0] = name0@domain.com
$email_addresses[1] = name1@domain.com
$email_addresses[2] = name2@domain.com
into
$recipients= "name0@domain.com, name1@domain.com, name2@domain.com";
Two points here...
(i) I believe php uses comas (,) instead of semi-colons(;) between the email
addresses
(ii) does the space between addresses matter? I would rather have it as my
user could see the recipeints more clearly.
R.