首页 >php教程 >php手册 >php正则连接中文本程序

php正则连接中文本程序

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB原创
2016-06-13 10:58:591558浏览

$htm = "<a href=&#39;http://www.php100.net&#39;>test1</a><br />" .
          "<a href=&#39;http://www.php100.net&#39;>test2</a><br />" .
          "<a href=&#39;http://www.php100.net&#39;>test3</a><br />" .
          "<a href=&#39;http://www.php100.net&#39;>test4</a><br />" .
          "<a href=&#39;http://www.php100.net&#39;>test5</a><br />";

   echo $htm . "<br />";
   echo stripthetag($htm);

function stripthetag($link) {

   return (preg_replace(&#39;@<[/!]*?[^<>]*?>@si&#39;, &#39; &#39;, $link));
}

声明:
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn