$replace = 'replace';
$my_string = ' abC.com, Abc.net, aBc.org, ABC.info, aBC.biz ';
$lowerCase = 'abc';
$str_replace = str_replace($lowerCase, $replace, $my_string);
echo $str_replace;
我需要的结果如下:replace.com,replace.net,replace.org,replace.info,replace.bizPHP str_replace函数不能按预期工作
使用'str_ireplace'。 http://php.net/manual/en/function.str-ireplace.php – smoqadam