Im trying to apply htmlspecialchars() to hrefs in a string. Here is what I have. ------------------------ <?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); print($str); ?> Any help would be appreciated. Thanks -- Gerard Samuel http://www.trini0.org:81/ http://dev.trini0.org:81/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php