str_replace Function in PHP
What is str_replace Function?
Explanation
In PHP, this function is used to replace all occurrences of the search string with the replacement string, this function is case sensitive.
Syntax:
str_replace(search,replace,string,count)
In the above syntax "search" specifies the value to be replaced,"replace" specifies the value to be replaced with, "string" specifies the string to be searched in, "count" specifies the variable with the number of replacements.
Example :
<?php
echo str_replace("India","Folks","Hiox India");
?>
Result :
Hiox Folks
In the above example "Hiox India", "India" is replaced with "Folks",since the function is case sensitive the strings are in matching case.