How Remove \r\n From String In Php

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);
string remove line breaks php
preg_replace( "/\r|\n/", "", $yourString );
php remove \t and \n
$str = preg_replace('/(\v|\s)+/', ' ', $str);

Leave a Comment