title: How To Subtract Values From An Array In PHP?
body: <p>I am trying to "subtract" the values of an array in php. I used array_diff but it doesn't seem to work for more than one value.</p>
  
  <pre><code>&lt;?php
  
      $array1 = array(1,3,7,10,7);
      $array2 = array(1,7);
  
      $result=array_diff($array1,$array2);
      print_r($result);
  
  ?&gt;
  
  //Output//
  Array ( [1] =&gt; 3 [3] =&gt; 10 )
  </code></pre>
  
  <p>What I would like to do is return 3,7,10 instead of excluding all 7's. Thanks in advance!</p>