/ Published in: PHP
This function converts URLs and e-mail addresses within a string into clickable hyperlinks.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
function makeClickableLinks($text) { '<a href="\1">\1</a>', $text); '\1<a href="http://\2">\2</a>', $text); '<a href="mailto:\1">\1</a>', $text); return $text; }