title: using array_intersect_key on a single array
body: <p>I have an array which looks like this:</p>
  
  <pre><code>Array
  (
      [0] =&gt; Array
          (
              [Binding] =&gt; Video Game
              [Brand] =&gt; Sony
              [Color] =&gt; Crystal black
              [EAN] =&gt; 0151903136010
              [Edition] =&gt; WiFi
           )
      [1] =&gt; Array(
              [Binding] =&gt; Console
              [Brand] =&gt; Nintendo
              [Color] =&gt; blk n wht
              [EAN] =&gt; 0045496880866
              [Edition] =&gt; Deluxe Set
           )
  </code></pre>
  
  <p>What I want to do is to be able to extract only the common keys, the value doesn't matter. The items in this array can range from 2 to 6. </p>
  
  <p>It seems like <code>array_intersect_key</code> is the function that I'm looking for but it takes 2 or more arrays as an argument so I'll have to do something like:</p>
  
  <pre><code>$item_count = count($items);
  if($item_count == 2){
    $intersection = array_intersect_key($items[0], $items[1]);
  }else if($item_count == 3){
    $intersection = array_intersect_key($items[0], $items[1], $items[2]);
  }
  </code></pre>
  
  <p>It feels like pretty tedious to do it this way. Any ideas what would be the easier and more elegant way to do this without using ifs? Thanks in advance!</p>