php remove new lines from text code example
Example 1: how remove \r\n from string in php
$text = preg_replace("/\r|\n/", "", $text);
Example 2: string remove line breaks php
preg_replace( "/\r|\n/", "", $yourString );
$text = preg_replace("/\r|\n/", "", $text);
preg_replace( "/\r|\n/", "", $yourString );