PHP MYSQL fetching a TEXT with new lines

后端 未结 3 701
慢半拍i
慢半拍i 2020-12-11 06:18


        
3条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-11 06:45

    Use this:

    echo nl2br($result[msg]);
    

    As long as browsers doesn't treat \r\n as real new-lines - you need to "convert" them to
    's with nl2br()

提交回复
热议问题