title: How can I use in_array if the needle is an array?
body: <p>I have 2 arrays, the value will be loaded from database, below is an example:</p>
  
  <pre><code>$arr1 = array(1,2,3);
  $arr2 = array(1,2,3,4,5,6,7);
  </code></pre>
  
  <p>What I want to do is to check if <strong>all the values</strong> in <code>$arr1</code> exist in <code>$arr2</code>. The above example should be a <code>TRUE</code> while:</p>
  
  <pre><code>$arr3 = array(1,2,4,5,6,7);
  </code></pre>
  
  <p>comparing <code>$arr1</code> with <code>$arr3</code> will return a <code>FALSE</code>.</p>
  
  <p>Normally I use <code>in_array</code> because I only need to check single value into an array. But in this case, <code>in_array</code> cannot be used. I'd like to see if there is a simple way to do the checking with a minimum looping.</p>
  
  <p>UPDATE for clarification.</p>
  
  <p>First array will be a set that contains unique values. Second array can contain duplicated values. They are both guaranteed an array before processing.</p>