📜  如何从 php 代码示例中的字符串中删除 \r\n

📅  最后修改于: 2022-03-11 14:53:40.885000             🧑  作者: Mango

代码示例2
//Replace the newline and carriage return characters
//using regex and preg_replace.
$text = preg_replace("/\r|\n/", "", $text);