Home  >  Article  >  Backend Development  >  PHP怎样获取mysql里textarea的回车显示文本

PHP怎样获取mysql里textarea的回车显示文本

WBOY
WBOYOriginal
2016-06-23 14:08:571087browse

就是我有一个

然后我在textarea里按了回车键换行.然后写入数据库.
然后用PHP获取数据.那PHP怎样识别我在textarea里的回车键?
(我不想在textarea里手打回车标识)
就好像发贴一样.会自动识别我的回车键;
求大神;


回复讨论(解决方案)

nl2br() 函数在字符串中的每个新行 (\n) 之前插入 HTML 换行符 (
)。

编辑器可以处理换行。。。

编辑器可以处理换行。。。

nl2br() 函数在字符串中的每个新行 (\n) 之前插入 HTML 换行符 (
)。
版主,你能把我楼下的回复字符串处理成只省下一个换行么?

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn