How to replace all new lines of string with `<BR>` in php?
问题 There are too much confusion about \n and \r. There are lot's of questions in stack about differences between \n and \r. In a nut shell My confusions/questions are: Is \r\n equal to \n\r? Is \r\n cause to two new lines? Is \r cause a new line in output? How can I replace all new lines with <BR> tag in PHP? Not all strings has \r or \n explicitly . Suppose I have a textarea and user inputs some characters including Enter of keyboard. No \r or \n is entered but new lines exist. How to remove