ciao a tutti, usa la seguente funzione x trasformare un url in un link cliccabile
vorrei pero che la preg_replace escludesse link a immagini del tipoCodice PHP:
function hyperlink($text) {
$text = preg_replace("/(((http|https)\:\/\/){1}\S+)/","[url='$1']link[/url]",$text);
return $text;
}
http://www.sito.it/img/img1.gif
http://www.sito.it/img/img1.png
http://www.sito.it/img/img1.jpg