I have been trying to figure out how to force the font tags in a multi-line string var containing HTML to be of a certain face and size.
I know I have to use preg_replace but i am getting nowhere. Help?
Wouldn't it be better to use CSS?
$pattern="/<font(.*?)>/i";
should match every font tag.
I know I'm answering my own question but here it is:
$text = ereg_replace("(<font|<FONT)[>]*>", "<font face = 'verdana, arial, helvetica' size=2 color='#666666'>",$text);