I have a text it has <a href="http://www.com">Anchor</a/> When i make it strip tags it gives "Anchor" But i want to filter this too so it will remove full of this <a href="http://www.com">Anchor</a/> from text I tried some codec preg_replace etc. but i couldn't do it . How can i do it ?
$text = preg_replace('~<a[^>]+>(.*?)>~si', null, $text); $text = preg_replace('</a>', null, $text); Try it