php string delete r n code example Example: how remove \r\n from string in php $text = preg_replace("/\r|\n/", "", $text);