$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
$htm = "<a href='http://www.php100.net'>test1</a><br />" .
          "<a href='http://www.php100.net'>test2</a><br />" .
          "<a href='http://www.php100.net'>test3</a><br />" .
          "<a href='http://www.php100.net'>test4</a><br />" .
          "<a href='http://www.php100.net'>test5</a><br />";

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

function stripthetag($link) {

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


来自:PHP100

关键字标签:

上一篇:session 的工作原理与session用法
下一篇:PHP 数据类型