><?php > >$str = 'hi <b>my friend</b>! <br /> this message uses html entities <a >href="http://www.trini0.org">test</a>!'; >$str = preg_replace('/(<a href="http:\/\/.*">.*<\/a>)/', >htmlspecialchars("$1"), $str);
Maybe I'm missing something here, but can't you just do: $str = htmlspecialchars($str); -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php