x
 
<!DOCTYPE html>
<html>
<body>
<?php
$arr = array("blue","red","green","yellow");
print_r(str_ireplace("RED","pink",$arr,$i)); // 此函数对大小写不敏感
echo "替换数:$i";
?>
  
</body>
</html>