![]() |
如何用php删除越级链接且保留文字?
有2个方法,第一个是用strip_tags() will strip HTML tags来实现:
Code:
strip_tags($text, '<br>');Code:
preg_replace('#<a.*?>(.*?)</a>#i', '\1', $text)Code:
preg_replace('#<a.*?>.*?</a>#i', '', $text) |
| All times are GMT +8. The time now is 10:48 AM. |
Powered by vBulletin Version 3.8.7
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.