Is there any possibility to use str_replace for multiple value replacement in a single line. For example i want to replace \' \' with \'-\'>
str_replace
\' \'
\'-\'>
$name = abcd;
I want to replace 'a' with '$' and 'b' with '!', so I need to write like this:
$str = ['a','b']; $rplc =['$','!']; echo str_replace("$str","$rplc",$name);
output : $!cd
$!cd