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); Source:thisinterestsme.com string remove line breaks php preg_replace( “/\r|\n/”, “”, $yourString ); Source:stackoverflow.com php remove \t and \n $str = preg_replace(‘/(\v|\s)+/’, ‘ ‘, $str); Source: stackoverflow.com