Here is my script
$searchArray = array("Coupon Codes", "Coupon Code", "Promo", "Promo Codes");
$replaceArray = array("Promo Code", "Promo Codes", "Coupons", "Coupon Code");
$intoString = "Best Buy Coupon Codes";
print str_replace($searchArray, $replaceArray, $intoString);
Result: Best Buy Coupons Code
Expected Output: Best Buy Promo Code
PHP Version 5.6.36
See Question&Answers more detail:os