PHP 从mysql返回多段文本每段后都加了<br />标签怎么实现首行缩进

WBOY
Release: 2016-06-13 13:50:30
Original
2204 people have browsed it

PHP 从mysql返回多段文本每段后都加了
标签如何实现首行缩进?
php从mysql数据库中返回的字符串文本每段后都加了
标签,请问这在CSS中   如何缩进?
而且返回的文本没有

标签!大家有没有其他方法?

------解决方案--------------------
不可能,是你的程序中加的吧,或者本来数据库中就有
------解决方案--------------------
1.
肯定是你的程序替换\r\n产生的.
2. 用text-indent: XXpx;
------解决方案--------------------
内容....
------解决方案--------------------

就是因为nl2br()产生的.
------解决方案--------------------
你在表单提交处理时是不是替换过一次。
------解决方案--------------------
1.用php的nl2br
2.用html的
<br><font color="#e78608">------解决方案--------------------</font><br>取出数据后如此处理一下吧~ <br> $content =  '你的内容 '; <br> $content =  ' <p>  '.str_replace( " <br>  ", " </p>  <p>  ",$content). ' </p>  '; <div class="clear">
                 
              
              
        
            </div>
Copy after login
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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!