【发布时间】:2011-04-19 08:17:45
【问题描述】:
如何删除链接并保留文本?
text text text. <br><a href='http://www.example.com' target='_blank' title='title' style='text-decoration:none;'>name</a>
像这样:
text text text. <br>
我还是有问题.....
$text = file_get_contents('http://www.example.com/file.php?id=name');
echo preg_replace('#<a.*?>.*?</a>#i', '', $text)
在那个网址中是那个文本(带有链接)......
此代码不起作用...
怎么了?
有人可以帮我吗?
【问题讨论】: