Php conversion form textarea line break code. After my test form textarea line break, in windows it is rn, in linux it is n (this is not tested), in addition, in win, r, n have a line break function Table 6-1. escape character sequence meaning n line breaks through my test form textarea line break. in windows, it is rn, and in linux it is n (this is not real
Test). In addition, in win, r and n have the line feed function.
Table 6-1. escape characters
Sequence
Description
N
Line feed (lf or ascii characters 0 × 0a (10 ))
R
Press enter (cr or ascii character 0 × 0d (13 ))
T
Horizontal Tab (ht or ascii character 0 × 09 (9 ))
Backslash
$
Dollar Sign
"
Double quotation marks
[0-7] {1, 3}
This regular expression matches a character in the octal symbol.
X [0-9a-fa-f] {1, 2}
This regular expression matches a character in the hexadecimal notation.
Conclusion: many friends say that the newline code n in textarea is like this in str_replace ("n ","
< p>
<>
/> "), But we do not know that this is not the Windows standard line feed. we should change it to str_replace.
("Nr ","
") So ko.
Escape (this is not a real test). In addition, in win, r and n have the function Table 6-1. escape character sequence meaning n line breaks...