/ Published in: PHP
Nice simple snippet. Great for forum scripts.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
function linkify($url){ $string = ereg_replace("[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/]","<a href=\"\\0\" target=\"_blank\">\\0</a>", $url); return $string; }