Compare the array keys from one array to another array
<p>I'm wondering if there is a function in php that would able to compare the array keys from another array and return the arrays that doesn't exist on the other array for example:</p>

<pre><code>$sample1 = array('val1', 'val2', 'val3', 'val4');
$sample2 = array('val1'=&gt;'test','val4'=&gt;'uhm...');
</code></pre>

<p>If I compare this two arrays I must able to identify that in sample2 variable the 2 associative array indexes val2 and val3 doesn't exist if when I try to base the results coming from sample1 variable.</p>

<p>Are there any functions in php that could do this?</p>
