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 echo str_replace('search', 'replace', 'string search'); // string replace
3?>