1 2 3 4 5
<?php $my_replacements = array("my dog", "doga"); $my_string = "doga my dog test"; $replaced_string = str_replace($my_replacements, '', $my_string); echo $replaced_string;
1
test