mySQL中PHP电子邮件中的换行符

mySQL中PHP电子邮件中的换行符,php,mysql,Php,Mysql,我有以下代码可以工作-除了不为每个结果拆分成单独的行之外 <?php> $result = mysql_query("SELECT * FROM lending"); //fetch the data from the database $entries = 'Entries: '; while ($row = mysql_fetch_array($result)) { $entries .= $row['bookname'] . ', "/r"'; } { ?> /

我有以下代码可以工作-除了不为每个结果拆分成单独的行之外

<?php>

$result = mysql_query("SELECT * FROM lending");
 //fetch the data from the database 
$entries = 'Entries: '; 
while ($row = mysql_fetch_array($result)) {
$entries .= $row['bookname'] . ', "/r"';
}
{
?>

// In case any of our lines are larger than 70 characters, we should use wordwrap()
//$entries = wordwrap($entries, 70, "\r\n");

// Send
mail('me@example.com', 'My Subject', $entries);
?>

//如果我们的任何一行超过70个字符,我们应该使用wordwrap()
//$entries=wordwrap($entries,70,“\r\n”);
//发送
邮件('me@example.com“,”我的主题“,$条目);
?>
当我运行此程序时,会收到一封类似以下内容的电子邮件:

条目:Test ASIN、\r“Test ASIN、\r”Test ASIN、\r“Test ASIN、\r”Test ASIN、\r“准爸爸:未来爸爸的事实、提示和建议”、\r“动物农场”、\r“大黄蜂飞行”\r

我应该将“/r”放在哪里才能正确解析它?还是应该是“/n/r”

谢谢


Alex

代码似乎有/r而不是\r.

使用
\r
\n
而不是
/n
/r
条目:Test ASIN、\r“Test ASIN”、\r“Test ASIN”、\r“Test ASIN”、\r“Test ASIN”、\r“准爸爸:事实、提示和建议”、\r“动物农场”、\r“大黄蜂飞行”、\r“是否觉得“\r”在代码中的位置不正确?