Because the standard_error stops anything else once it's called, it will only loop once through the foreach loop.
Try something like this instead:
PHP Code:
$bwords = explode("|", $vbulletin->options['banwords_wordslist']);
$string = $vbulletin->GPC['message'];
$matches = array();
$matchFound = preg_match_all(
"/\b(" . implode($bwords,"|") . ")\b/i",
$string,
$matches
);
if ($matchFound)
{
$words = array_unique($matches[0]);
eval (standard_error( "Banned Words : <li>" . implode(", ", $words) . "</li>"));
}