开发者

Link to text PHP

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=开发者_Go百科\"_blank\">\\2</a>", $text); 
     return $text;
} 

Thanks :)


Use strip_tags strip_tags("test");

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜