function NewsTextReplace($add){ $add['newstext'] = preg_replace('/<img.*?src="(.*?)".*?>/is', '<mip-img alt="" src="$1"></mip-img>', stripslashes($add['newstext'])); $add['newstext'] = preg_replace('/<a.*?href="(.*?)".*?<//a>/is', '<a data-type="mip" data-title="' . $add['title'] . '" href="$1"></a>', $add['newstext']); $add['newstext'] = addslashes($add['newstext']); return $add; } |
$r = NewsTextReplace($r); |
新闻热点
疑难解答