Rumah >pembangunan bahagian belakang >tutorial php >php正则连接中文本程序_PHP教程
$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)); }