Posted By

lewiswalsh on 10/25/11


Tagged


Versions (?)

Convert URIs in string to html links


 / Published in: PHP
 

  1. preg_replace('/(https?:\/\/\S+)/', '<a href="\1">\1</a>', $string);

Report this snippet  

You need to login to post a comment.