I have a collection of text that I am trying to process with PHP dynamically (the data comes from an XML file), however I want to strip the a link and the text that is linked.
PHP's strip_tags takes out the <a etc...>
and </a>
but not the text in between.
I am currently trying to use the Regex preg_replace('#(<a.*?>).*?(</a>)#', '', $content);
Another thing to note is the links have styles, classes, href and titles.
Does anyone know the solution?