如何完全显示在mysql中保存的内容 [英] how to show the content exactly as it's saved in mysql
本文介绍了如何完全显示在mysql中保存的内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的内容存储在mysql中,如下所示:
i have a content stored in mysql like below:
first line
second line
third line
但是当我使用echo函数时,它会显示这样的输出
but when i use the echo function it shows the output like this
first line second line third line
但是我想显示输出与mysql中保存的完全一样.
however i want to show the output exactly as its saved in mysql.
推荐答案
echo nl2br($ str_from_db);
echo nl2br($str_from_db);
这篇关于如何完全显示在mysql中保存的内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文