凑个热闹。。第二个问题。。<?php
function array_replace($array_str)
{
global $tstr;
if (preg_replace(array("/^mailto:(.*)$/i","/^javascript:(.*)$/i"),"",$array_str))
{
$tstr[] = preg_replace(array("/^mailto:(.*)$/i","/^javascript:(.*)$/i"),"",$array_str);
}
}
$str = array("mailto:xxx", "javascript:xxx", "http://x.com");
array_walk($str,"array_replace");
print_r($tstr);
?>应该有更好的办法