The source of accepted news content is sometimes the text content in TextBox. However, if the text content is not processed, the text will not have any format, and will be displayed row by row.
The source of accepted news content is sometimes the text content in TextBox. However, if the text content is not processed, the text will not have any format, and will be displayed row by row. What we are talking about now is how to make text content line break without being crowded together.
During single-step debugging, we will find that in the obtained text content, the line feed in the text is replaced with "rn", because it has never been found, leading to a large circle. After finding this cause, you can replace this string with
.
String strBody = Body. Replace ("rn ","
");
Although it was easy, it was really a headache when I didn't know it at the time. I hope it will be useful to you too. The following are examples:
-
-
- If ($ _ POST ){
- Echo str_replace (chr (13 ),'
', $ _ POST [' t']);
- }
- ?>