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