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

WBOY
发布: 2016-06-13 10:07:59
原创
835 人浏览过

求助呀,关于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;?> 
登录后复制


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

------解决方案--------------------
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>
登录后复制
相关标签:
来源:php.cn
本站声明
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn
热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责声明 Sitemap
PHP中文网:公益在线PHP培训,帮助PHP学习者快速成长!