更新时间:2023-02-22 22:38:32
我建议您将文本保留在链接中。
I suggest you to keep the text in link.
strip_tags($text, '<br>');
或困难的方式:
preg_replace('#<a.*?>(.*?)</a>#i', '\1', $text)
如果您不需要在链接中保留文字
If you don't need to keep text in the link
preg_replace('#<a.*?>.*?</a>#i', '', $text)