1<?php
2//str_replace("Original Value", "Value to be replaced", "String");
3$result = str_replace("1", "2", "This is number 1");
4// Output: This is number 2
5?>
1$var1 = 'hello.world';
2$var2 = str_replace(".", "-", $var1);
3echo $var2; // hello-world
4
1<?php
2$string = str_ireplace("FoX", "CAT", "the quick brown fox jumps over the lazy dog");
3echo $string; // the quick brown CAT jumps over the lazy dog
4?>