Is it possible to use strtolower
in the substitution part of preg_replace
?
This isn’t working:
preg_replace('/(http:\/\/)?(www\.)?([a-zA-Z0-9\-_\.]+\.(com|co\.uk|org|tv|biz)(\/[a-zA-Z0-9\-\._\?&=#\+;]+)*)/i', '<a href="http://www.'.strtolower('$3').'" target="_blank">'.strtolower('$3').'</a>', $d);