title: find difference between two associative multidimensional arrays
body: <p>I have two associative multidimensional arrays, now I want to get values which are not present in the second array (compare by both key name and type).</p>
  
  <pre><code>$sql = "select * from `medicine`;"; 
  $result = mysqli_query($con, $sql);
  $response = array();
  while ($row = mysqli_fetch_array($result)) {
      array_push($response, array("name" =&gt; ucfirst($row['name']), "type" =&gt; $row['type']));
  }
  </code></pre>
  
  <p>Output :</p>
  
  <blockquote>
    <p><code>Array ( [0] =&gt; Array ( [name] =&gt; A2 [type] =&gt; syringe ) [1] =&gt; Array
    ( [name] =&gt; A3 [type] =&gt; syringe ) [2] =&gt; Array ( [name] =&gt; A3 [type]
    =&gt; capsule ) [3] =&gt; Array ( [name] =&gt; A4 [type] =&gt; syringe )[4] =&gt; Array ( [name] =&gt; A5 [type] =&gt; a ) [5] =&gt; Array ( [name] =&gt; A6 [type]
    =&gt; capsule ) )</code></p>
  </blockquote>
  
  <pre><code>$s = "select * from `doctor_medicine` where `email` = '$email';";   
  $res = mysqli_query($con, $s);
  $resp = array();
  while ($row = mysqli_fetch_array($res)) {
      array_push($resp, array("name" =&gt; ucfirst($row['medicine_name']),"type" =&gt; $row['type']));
  }
  </code></pre>
  
  <p>Output :</p>
  
  <blockquote>
    <p><code>Array ( [0] =&gt; Array ( [name] =&gt; A2 [type] =&gt; syringe ) [1] =&gt; Array
    ( [name] =&gt; A3 [type] =&gt; capsule ) [2] =&gt; Array ( [name] =&gt; A4 [type]
    =&gt; syringe ) )</code></p>
  </blockquote>
  
  <p>I don't know how to find difference
  Result : </p>
  
  <blockquote>
    <p><code>Array ( [0] =&gt; Array ( [name] =&gt; A3 [type] =&gt; capsule ) [4] =&gt; Array
    ( [name] =&gt; A5 [type] =&gt; a ) [5] =&gt; Array ( [name] =&gt; A6 [type] =&gt;
    capsule ) )</code></p>
  </blockquote>