Return to Snippet

Revision: 12048
at February 28, 2009 18:45 by Unreal


Initial Code
function linkify($url){
	$string = ereg_replace("[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/]","<a href=\"\\0\" target=\"_blank\">\\0</a>", $url); 
	return $string;
}

Initial URL
http://www.imben.co.uk

Initial Description
Nice simple snippet. Great for forum scripts.

Initial Title
Turn Static URLs Into Links

Initial Tags
text, links

Initial Language
PHP