PHP电子邮件中的新换行符

我有以下代码:

$message = "Good news! The item# $item_number on which you placed a bid of \$ $bid_price is now available for purchase at your bid price.\n

The seller, $bid_user is making this offer.\n

\nItem Title : $title\n

\nAll the best,\n

$bid_user\n

$email\n

";

echo $message;

$htmlContent = $baseClass->email_friend($item_number, $title, $bid_price, $bid_user, $mcat, $message, $email, $VIEWSTATE, $EVENTVALIDATION, $URL);

问题是 (\n)不起作用。

回答:

尝试\r\n代替\n

\ n和\ r \ n之间的区别

应当注意,这适用于电子邮件中的行退回。

以上是 PHP电子邮件中的新换行符 的全部内容, 来源链接: utcz.com/qa/403467.html

回到顶部