text - PHP: STR replace by link -


I have this PHP chatbox.

If I type a link in the chatbox, then it will not display it as a link.

How can I change the place of STR to do this?

It should answer things like 'http' http: // '' .com '' .nl '' www '' www. '....

Instead of my second STR lines, this looks like this:

bericht = str_replace ("STRING1", "STRINGREPLACEMENT1", $ bericht);

Anyone?

Hey! Try this code (found on php.net somewhere):

  function format_urldetect ($ text) {$ tag = "rel = \" nofollow \ ""; // // First of all, start with the strings http: //, which is the & lt; A href tag // $ text = preg_replace ("/ (? & Lt;! & Lt; a href = (\" | ')) () () () () () () (+ (HT | FTP | http) + (S)?: \ / \ / [^  

Uh, Broken indentation. Try it


Comments

Popular posts from this blog

MySql variables and php -

url rewriting - How to implement the returnurl like SO in PHP? -

Which Python client library should I use for CouchdB? -