i want to replce the value in string in 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