$lesujet = "testing ...";
$letexts = "a bunch of text
there is a return break here
another return break as you see";
mail("myemail@gmail.com",$lesujet,$letexts,$headers);
我希望能够删除返回中断并仅保留 1,我尝试过:
$letexts = str_replace("\r","",$letexts);
$letexts = str_replace("\n","",$letexts);
它不起作用。我期望它输出格式如您在上面看到的文本,而不是它返回的内容(每个返回中断加倍,这很烦人):
a bunch of text
there is a return break here
another return break as you see