- array_diff_assoc: documentation ( source)
- var_dump: documentation ( source)
- array_flip: documentation ( source)
<?php
$all_servers = ['de' => 'de.example.org', 'fr' => 'fr.example.org', 'it' => 'it.example.org', 'no' => 'no.example.org'];
$exclude = ['it', 'fr'];
$filtered = array_diff_assoc($all_servers, array_flip($exclude));
var_dump($filtered);