$str = “文字信息时间文字信息文字信息文字信息文字信息文字信息文字信息”;
$fstr = “时间”; s t r = s t r i p t a g s ( t r i m ( str = strip_tags(trim( str=striptags(trim(str));
echo str_ireplace( f s t r , " < f o n t c o l o r = ′ r e d ′ > fstr, "<font color='red'> fstr,"<fontcolor=′red′>fstr", $str);