Using nl2br to preserve textarea new lines to mysql… how to return data to textbox nicely?

前端 未结 1 1694
Happy的楠姐
Happy的楠姐 2021-01-27 23:25

I have a form with a textarea whose results are inserted into a mysql database. I\'m using nl2br to preserve the line breaks.

However, because this inserts br\'s in the

1条回答
  •  抹茶落季
    2021-01-28 00:17

    Store the test in the database with break lines and when you echo it out to the screen run it through nl2br.

    0 讨论(0)
提交回复
热议问题