views:

60

answers:

1

I'm already using this which I found on the net, for whenever I want to edit the information and there is already a converted link which is done by adding a new post, I need this to remove the link into text then when it's submitted to be updated, it will use this function to convert it into a link.

function Links($text)
{
     $text = preg_replace("#(^|[\n ])([\w]+?://[\w\#$%&~/.\-;:=,?@\[\]+]*)#is", "\\1<a href=\"\\2\" target=\"_blank\">\\2</a>", $text); 
     return $text;
} 

Thanks :)

+1  A: 

Use strip_tags strip_tags("test");

kevinverhoef
Worked beautifully :)
YouBook