开发者

How to place data on mysql to php array()

I have about 50 users in a database and I want to send them a newsletter.

开发者_Go百科
$result = mysql_query("SELECT email FROM users") or die(mysql_error());  
$row = mysql_fetch_array( $result ); // had 50 emails

How do I put the $row['email'] into the mail code below.

$m->setBcc(Array("email@email.com", "email2@email.com","email3@email.com"));

Let me know.


$recipients = array();

while($row=mysql_fetch_array($result))
{
 $recipients[] = $row['email'];
}

$m->setBcc($recipients);

tell me if it doesn't work and I'll immediately delete it :)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜