#Liens cliquables # function liens_cliquables($url){ $in=array( '`((?:https?|ftp)://S+)(s|z)`', '`((?<!//)(www.)S+)(s|z)`'); $out=array( '<a href="$1" target="_blank">$1</a>&nbsp;', '&nbsp;<a href="http://$1" target="_blank">$1</a>&nbsp;'); return preg_replace($in,$out,$url); }