$cellValue) { if (preg_match('/\b(' . $groupName . ')\b/', (string)$headerName) === 1) { $occurrences[$headerName] = $cellValue; } } return $occurrences; } }