PHP - want to check if user input has website address in it
I want that whenver a user inserts "www." in a comment textarea, the address from "www." until the first space will be a replaced with a link to that address:

    "I love www.google.com"
    turns into
    "I love <a href="www.google.com">www.google.com</a>"

Can you please tell me how to do this? (newbie)

(sorry for posting the earlier question I still don't quite get it).

Should I use `preg_match_all()`? 
PHP - want to check if user input has website address in it
===

I want that whenver a user inserts "www." in a comment textarea, the address from "www." until the first space will be a replaced with a link to that address:

    "I love www.google.com"
    turns into
    "I love <a href="www.google.com">www.google.com</a>"

Can you please tell me how to do this? (newbie)

(sorry for posting the earlier question I still don't quite get it).

Should I use `preg_match_all()`? 