Page 1 of 1

Delete links

Posted: Sun Jan 31, 2010 7:03 pm
by bidoun
Hello

I would like to know how to delete links and may not appear click able on a string using preg_replace, I have a issue with regular expressions? Also how to delete images 'being click able or not' ?

Thank you

Re: Delete links

Posted: Mon Feb 01, 2010 4:13 pm
by klevis miho
Try this

preg_replace('#<a(.+?)</a>#s', '', $string);