Posted By


browncardigan on 02/08/10

Tagged


Statistics


Viewed 129 times
Favorited by 0 user(s)

convertUrlsToLinks


/ Published in: PHP
Save to your folder(s)



Copy this code and paste it in your HTML
  1. function convertUrlsToLinks($content='') {
  2. return ereg_replace("[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/]","<a href=\"\\0\" rel=\"nofollow\">\\0</a>", $content);
  3. }

URL: http://bettesmidler.com/code/2009-07-08.htm

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.