php字符替换

$str = “文字信息时间文字信息文字信息文字信息文字信息文字信息文字信息”;

$fstr = “时间”;
s t r = s t r i p t a g s ( t r i m ( str = strip_tags(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", $str);

猜你喜欢

转载自blog.csdn.net/leejing623/article/details/84839846