PHP Search through array A for matching id from array B Then print data from array B
<p>Here's what the first array outputs:</p>

<pre><code>Array ( 
[0] =&gt; Array ( [id] =&gt; 67 [title] =&gt; avatar delete any ) 
[1] =&gt; Array ( [id] =&gt; 66 [title] =&gt; avatar edit any ) 
[2] =&gt; Array ( [id] =&gt; 65 [title] =&gt; avatar upload ) 
[3] =&gt; Array ( [id] =&gt; 8 [title] =&gt; comments edit own ) 
[4] =&gt; Array ( [id] =&gt; 6 [title] =&gt; comments post ) 
[5] =&gt; Array ( [id] =&gt; 9 [title] =&gt; comments remove own ) 
[6] =&gt; Array ( [id] =&gt; 7 [title] =&gt; comments vote ) 
[7] =&gt; Array ( [id] =&gt; 5 [title] =&gt; get other members emails )
[8] =&gt; Array ( [id] =&gt; 1 [title] =&gt; send greetings ) 
[9] =&gt; Array ( [id] =&gt; 4 [title] =&gt; send messages ) 
[10] =&gt; Array ( [id] =&gt; 64 [title] =&gt; use flip chat ) 
[11] =&gt; Array ( [id] =&gt; 11 [title] =&gt; videos add ) 
[12] =&gt; Array ( [id] =&gt; 13 [title] =&gt; videos approve ) 
[13] =&gt; Array ( [id] =&gt; 12 [title] =&gt; videos delete ) 
[14] =&gt; Array ( [id] =&gt; 14 [title] =&gt; videos edit ) 
[15] =&gt; Array ( [id] =&gt; 10 [title] =&gt; videos view ) 
[16] =&gt; Array ( [id] =&gt; 2 [title] =&gt; view profiles ) 
[17] =&gt; Array ( [id] =&gt; 3 [title] =&gt; vote ) )
</code></pre>

<p>The Second array outputs this:</p>

<pre><code>Array (
[2] =&gt; Array ( [id] =&gt; 2 [title] =&gt; view profiles [AllowedCount] =&gt; 5 [AllowedPeriodLen] =&gt; 5 ) 
[3] =&gt; Array ( [id] =&gt; 3 [title] =&gt; vote [AllowedCount] =&gt; 0 [AllowedPeriodLen] =&gt; 0 ) )
</code></pre>

<p>I'm  using a foreach to loop through the first array to display actions that are enabled.  How would I check if the Key of the second array matches the key of the First, then give variables values from AllowedCount, and AllowedPeriodLen?</p>
