/ Published in: PHP
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
function convertUrlsToLinks($content='') { return ereg_replace("[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/]","<a href=\"\\0\" rel=\"nofollow\">\\0</a>", $content); }
URL: http://bettesmidler.com/code/2009-07-08.htm