str remove php code example
Example 1: php replace
str_replace ($search, $replace, $subject);
Example 2: str_replace php variable
$var1 = 'hello_john';
$var2 = str_replace("_", "-", $var1);
echo $var2; // hello-john
str_replace ($search, $replace, $subject);
$var1 = 'hello_john';
$var2 = str_replace("_", "-", $var1);
echo $var2; // hello-john