Let us say I have string like below $comments = Windows Embedded Compact (Windows CE) or Windows Server. Defunct Windows families include Windows 9x and Windows Mobile. [CR][LF] [CR][LF] Microsoft introduced an operating environment named Windows on November 20, 1985, as a graphical operating system shell for MS-DOS in response to the growing interest in graphical user interfaces (GUIs).
Note: [CR][LF] are manually added for the question. I found this issue when any user copy and paste any html content in the comments rich text area box we are observing these elements.
Is there way where we can replace these with \n\r in PHP.
I tried something like this
$comments = preg_replace("/\r\n\r\n|\r\r|\n\n/", "<br />", $comments);
it didn't give me any proper result.