How to force PHP to read newlines and returns as

后端 未结 1 508
你的背包
你的背包 2021-01-24 22:55

The title is a little off im sorry. however what the scenario IS.

I\'m reading from a MySQL Database the field format is \"mediumtext\".

At current it knows when

相关标签:
1条回答
  • 2021-01-24 23:21

    You can use

    • nl2br — Inserts HTML line breaks before all newlines in a string

    Example from Manual:

    echo nl2br("Welcome\r\nThis is my HTML document", false);
    

    will output

    Welcome<br>
    This is my HTML document
    
    0 讨论(0)
提交回复
热议问题