Posted By

sheedy on 09/16/09


Tagged

php textmate


Versions (?)

Making links clickable with PCRE in PHP


 / Published in: Other
 

  1. <?php
  2. // Making links clickable with PCRE in PHP
  3. // http://jeremy.visser.name/2007/08/06/making-links-clickable-with-pcre-in-php/
  4. $clickable = preg_replace('*https?://[A-Za-z0-9./?=+&%]+*', '<a href="$0">$0</a>', $input);
  5. ?>
  6.  

Report this snippet  

You need to login to post a comment.