Q:

Best way to get keys and its values from an array which are not existent in another array compared only by its keys

hi I wanted to have some keys and values filtered out when compared with another array. 
The "content" pair should be displayed at the end...Any help is greatly appreciated THX alot! 
<? php
$test = array(
            ['slideid'] => 597,
            ['token'] =>'4e23fdd176372984870a9c65db7133b5',
            ['content'] =>'<p>sdg</p>',
        )
$test2 = array(
            ['slideid'] => "",
            ['token'] =>""
            )

foreach ($test not in $test2){
    print $test2
} //not working of course   

? > 

A:

This works:
$test = array(
    'slideid' => 597,
    'token' =>'4e23fdd176372984870a9c65db7133b5',
    'content' =>'<p>sdg</p>'
);
$test2 = array(
    'slideid' => "",
    'token' =>""
);

foreach ($test as $key => $value){
    if (! array_key_exists($key, $test2)) {
        echo $value;
    }
}

