I am making a BB/Forum.
I would like to have it so that if somebody enters a link in their post(eg. http://www.phpbuilder.com) that is automatically makes that a link.
Any ideas?
Thanks!
Travis
Check out in the code section, look for a regular expression to detect URLs and to convert them to links by using preg_replace.
It's so complicated ... try use something like:
$pattern = "/http:\/\/(\S+)/s"; $replace = "<a href=\"http://\1\">http:/\1</a>"; $input_text = preg_replace ($pattern, $replace, $input_text);