sdfsdfsdf

500){this.resized=true; this.style.width=500;}”>sfsdfsdfasdfsadf

500){this.resized=true; this.style.width=500;}”>sdfsadf

500){this.resized=true;this.style.width=500;}”>sdfsdf

其中src=”http://www.xxx.com/upimg/080330 /120D1232295023X0.gif” src=”http://www.xxx.com/upimg/080330 /120D1232295023X0.gif”这个地址要保留,因为图片用的都是源地址
preg_match_all就是我想要的函数,它能够把正则表达式匹配到的内容建立一个三维数组,你可以对它们进行遍历查找替换,不太了解的请查查手册,这里不作具体介绍。函数代码:
function replace($str)
{
preg_match_all(”/
![php preg_match_all结合str_replace替换内容中所有img_PHP教程]()
]+>/isU”, $str, $arr);
for($i=0,$j=count($arr[0]);$i$str = str_replace($arr[0][$i],”
![\”我的信息”]()
”,$str);
}
return $str;
}