Adding a line break in MySQL INSERT INTO text

后端 未结 10 2100
太阳男子
太阳男子 2020-12-07 22:07

Could someone tell me how to add a new line in a text that I enter in a MySql table?

I tried using the \'\\n\' in the line I entered with INSERT I

10条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-07 22:19

    First of all, if you want it displayed on a PHP form, the medium is HTML and so a new line will be rendered with the
    tag. Check the source HTML of the page - you may possibly have the new line rendered just as a line break, in which case your problem is simply one of translating the text for output to a web browser.

提交回复
热议问题