Why does PHP echo'd text lose its formatting?

前端 未结 7 1759
南旧
南旧 2020-11-27 21:39

Any ideas why formatted text from DB, when echo-ed out in php loses its formatting, i.e. no new lines? Thanks!

\

7条回答
  •  一生所求
    2020-11-27 22:21

    You could try add nl2br() function...

    something like this: echo nl2br($your_text_variable);

    It should work ;-)

提交回复
热议问题