呀,关于html标签内的换行解决···

WBOY
Release: 2016-06-13 10:07:59
Original
868 people have browsed it

求助呀,关于html标签内的换行解决···

PHP code
<!--Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--><?php $html = '</tbody><input type="hidden" name="prt" value="1"> <input type="image" src="/images/add_t_s_c.png">';$content=preg_replace("xxx","",$html);echo $content;?> 
Copy after login


像上面的例子,标签里出现了换行,如何通过正则表达式去把换行给去掉呢?
我写了很久,都没办法去掉换行。求高人帮忙~~~~~

------解决方案--------------------
PHP code
$html = '<input type="hidden" name="prt" value="1"> <input type="image" src="/images/add_t_s_c.png">';$content=preg_replace("/([^>])[\r\n]+/x","$1",$html);echo $content;<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