【发布时间】:2015-09-12 00:53:09
【问题描述】:
我确定这很简单......但我似乎无法弄清楚。我需要向提及这些要点的每个电子邮件地址发送一封电子邮件。但是两封邮件都有 36 分。
$emails = $userTools->weeklyMail();
打印_r:
Array
(
[0] => Array
(
[0] => email1@gmail.com
[1] =>
[2] => 36
)
[1] => Array
(
[0] => email2@gmail.com
[1] =>
[2] => 25
)
)
循环:
foreach($emails as $email)
{
$email = $email[0];
$subject = "You have ".$email[2]." points!!! !!!";
// The message
$message = "Hello\r\nYou have ".$email[2]." points .";
$helperClass->sendEmail($email, $subject, $message);
}
【问题讨论】:
标签: php