我有以下代码:
$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)
不管用。
Try \r\n
代替\n
\n 和 \r\n 的区别
应该注意的是,这适用于电子邮件中的行返回。其他场景请参考rokjarc的answer.
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)