$phrases = array(
"New York", "New Jersey", "South Dakota",
"South Carolina", "Computer Repair Tech"
);
$string = "I live in New York, but used to live in New Jersey working as a " .
"computer repair tech.";
$phrases
で見つかった抽出物$string
$new_string
出力は次のようになります。New York New Jersey Computer Repair Tech