Replace non-html links with <A> tags
- by tombazza
I have a block of code that will take a block of text like the following:
Sample text sample text http://www.google.com sample text
Using the preg_replace_callback method and the following regular expression:
preg_replace_callback('/http:\/\/([,\%\w.\-_\/\?\=\+\&\~\#\$]+)/',
create_function(
'$matches',
'$url =…