Hi,
How can I look for links in HTML and remove them?
$html = '<p><a href="javascript:doThis('Test Title 1')">Test Title 1</a></p>';
$html .= '<p><a href="javascript:doThis('Test Title 2')">Test Title 2</a></p>';
$html .= '<p><a href="javascript:doThis('Test Title 3')">Test Title 3</a></p>';
$match = '<a href="javascript:doThis('Test Title 2')">';
I want to remove the anchor but display the text. see below.
Test Title 2
I've never used Regular Expressions before, but maybe i can avoid it also. Let me know if im not clear.
Thanks
Mark
EDIT: its not a client side thing. I cant use javascript for this. I have a custom CMS and want to edit HTML stored in a Database.