Answers for "replace a string with two strings in php"

PHP
0

str_replace php variable

$var1 = 'hello_john';
$var2 = str_replace("_", "-", $var1);
echo $var2; // hello-john
Posted by: Guest on January-07-2021

Code answers related to "replace a string with two strings in php"

Browse Popular Code Answers by Language