Home > Backend Development > PHP Tutorial > 怎么交表单的textarea提交的文本的回车,转化为<p>

怎么交表单的textarea提交的文本的回车,转化为<p>

WBOY
Release: 2016-06-13 12:43:14
Original
908 people have browsed it

如何交表单的textarea提交的文本的回车,转化为


表单的textarea里提交的文本,提交以后,被写入mysql数据库,然后再读出来显示出来。结果发现回车没有了,本来好多段,结果结合起来变成一大段。

有什么办法把在表单的textarea里提交的回车符转化为象

这样的html标记呢?在写入数据库前转化好?还是从数据库里读出来以后转化好?

能给个具体的代码吗?

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template