开发者

How to use linebreaks in a textbox?

I am saving text from a textarea in the database and display it in another textarea. The linebreaks are displayed as \n which should be right, but the textarea is displaying them instead of do开发者_Go百科ing the breaks! How can I fix this?


You need to send a literal line break, not an escape sequence.


Thank you David,

this worked...

str_replace('\n', "
", $text);

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜