Finally I found my last error in my code but this time it is very confusing... As you can see in the code, the Output should be (Nothing). But I still get
Mitgliedschaft Card (Weltweit)
.
Why isn't it deleting this phrase? - It should only get deleted if the case \b
is active.
$deletewords = ["Mitgliedschaft Card (Weltweit)", "(Xbox 360/Xbox One/weltweit)", "Origins", "Guthaben Code - nur DE", "Guthaben Code für EA ORIGIN", "PC - nur DE"];
$myArra = ["Mitgliedschaft Card (Weltweit)", "Guthaben Code - nur DE", "Guthaben Code für EA ORIGIN", "PC - nur DE"];
foreach ($myArra as $string){
$string = mb_eregi_replace('\b' . implode('|', $deletewords) . '\b', '', $string);
echo $string;
}
It is confusing that all other words get deleted but Mitgliedschaft Card (Weltweit)
is still there...