how to identify line break in php on a string code example Example: remove line break html php preg_replace( "/\r|\n/", "", $yourString );