i need a code to remove the link from a String, here is the sample: This is a test. <a href="http://www.domain.com">my site</a> here is the 2nd line .;.... link againL <a href="http://www.domainsss.com">my 2nd site</a> Code (markup): I need a function to output it as Code: This is a test. my site here is the 2nd line .;.... link againL my 2nd site Code (markup): thanks for your help.
$value = '<a href="http://www.domain.com/123.html">123</a>'; echo preg_replace('/<a href="(.*?)">(.*?)<\\/a>/i', '$2', $value); PHP:
He wants LINKS removed, nowhere did he say he wants all HTML tags removed. discoverclips' example is perfectly fine.
i am sorry for the delay to get back, This one is works fun for me, but strip_tags removes all the HTML tags.