php str_replace multiple
str_replace(array(':', '\\', '/', '*'), ' ', $string);
0
0
print str_replace(
array("search1","search2"),
array("replace1", "replace2"),
"search1 search2"
);
Thank you!
0
0
5
1
// Provides: You should eat pizza, beer, and ice cream every day
$phrase = "You should eat fruits, vegetables, and fiber every day.";
$healthy = ["fruits", "vegetables", "fiber"];
$yummy = ["pizza", "beer", "ice cream"];
$newPhrase = str_replace($healthy, $yummy, $phrase);
Thank you!
1
0
Are there any code examples left?
New code examples in category PHP