1">
当前位置:Gxlcms > PHP教程 > ereg()着色返回显示匹配结束

ereg()着色返回显示匹配结束

时间:2021-07-01 10:21:17 帮助过:8人阅读

function replace($str)
{	
	static $color=0;
	$color+=50;
	return "".$str."";
}

if(  @ereg($match,$str,$array) )
	{
		if(count($array)>1)
		{ 
			$string=$str;
			$pos=strpos($string,$array[1]);
			$string=substr_replace($string,replace($array[1]),$pos,strlen($array[1]));
			$pos=$pos+strlen(replace($array[1]));
			echo $string.'
'; for($i=2;$i'; } } //end if(count($array)>1) print_r($array); }

人气教程排行