The data submitted using mysqli_real_escape_string has a format, and the output data is also formatted. because the data is verified, I used mysqli_real_escape_string, so that the data is directly displayed in the database in formats such as rn & nbsp, when I show the page, I find that the data does not show this style (line feed, bold, data is generally directly copied online content, some with the format ), instead, the data submitted using mysqli_real_escape_string is formatted, and the output data is formatted.
I used mysqli_real_escape_string to verify the data, so that the data is directly displayed in the database in a format such as \ r \ n, when I show the page, I find that the data does not show the current style (line feed, bold, data is generally directly copied online content, some with the format), but the current effect
What happened?
------ Solution ----------------------
\ R \ n is the text file's carriage return line break
The page is an html language with its own line break.
Nl2br ()