how remove \r\n from string in php
$text = preg_replace("/\r|\n/", "", $text);
php remove newline
//Replace the newline and carriage return characters
//using regex and preg_replace.
$text = preg_replace("/\r|\n/", "", $text);
Source:thisinterestsme.com
string remove line breaks php
Source:stackoverflow.com
php remove \t and \n
$str = preg_replace('/(\v|\s)+/', ' ', $str);
Source: stackoverflow.com