php no line breaks code example Example: remove line break html php preg_replace( "/\r|\n/", "", $yourString );