我一直在努力思考这个问题,但我无法得到自己的答案......
例如,当我总结所有收到电子邮件的人时,我想用逗号分隔他们,但以点结尾!
例如这段代码:
$emailnotificationmessage = "<p id='notification'>An e-mail notification has been sent to: ";
while( $record=mysql_fetch_array($checkwhotosendresult) )
{
$mailto=$record['email'];
$mail_ontv = $mailto;
if (mail($mail_ontv, $onderwerp, $inhoud_mail, $headers))
{
$emailnotificationmessage .= "$mail_ontv, ";
}
else
{
$emailnotificationmessage = "<p id='notification'>Error. E-mail could not be sent to the receipent.";
}
}
$emailnotificationmessage .= "</p>";
它返回:
An e-mail notification has been sent to: mail@mail.com, mail2@mail.com, mail3@mail.com,
那么我怎样才能以点结尾,以保持语言正确......?
编辑
我不想为此发布新问题,只是想知道如何and
在最后2
一封电子邮件之间放置一个?