How to remove a link from content in php?

genjurou

New Member
How can i remove the link and remain with the text?\[code\]text text text. <br><a href='http://www.example.com' target='_blank' title='title' style='text-decoration:none;'>name</a>\[/code\]like this:\[code\]text text text. <br>\[/code\]i still have a problem..... \[code\]$text = file_get_contents('http://www.example.com/file.php?id=name');echo preg_replace('#<a.*?>.*?</a>#i', '', $text)\[/code\]in that url was that text(with the link) ...this code doesn't work... what's wrong?Can someone help me?
 
Back
Top