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

php正则连接中文本程序

WBOY
WBOYOriginal
2016-06-13 10:58:591547browse

$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));
}

Statement:
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