title: How to exclude from multidimentional array values on condition given in another array
body: <p>I have two arrays where Array1 keys are [teacher_id] in Array2:</p>
  
  <pre><code>Array1 ( [20] =&gt; 37 [44] =&gt; 40 )
  
  Array2
  (
      [0] =&gt; Array
          (
              [teacher_id] =&gt; 44
              [course_id] =&gt; 1180
              [student_id] =&gt; 1662
          )
  
      [1] =&gt; Array
          (
              [teacher_id] =&gt; 20
              [course_id] =&gt; 1180
              [student_id] =&gt; 1662
          )
      [2] =&gt; Array
          (
              [teacher_id] =&gt; 44
              [course_id] =&gt; 1180
              [student_id] =&gt; 1705
          )
  )
  </code></pre>
  
  <p>I need to exclude this part from Array2:</p>
  
  <pre><code>[0] =&gt; Array
      (
          [teacher_id] =&gt; 44
          [course_id] =&gt; 1180
          [student_id] =&gt; 1662
      )
  </code></pre>
  
  <p>on condition that in array1 value 37 &lt;  value 40.</p>
  
  <p>I tried array_filter but I can't figure out how to write proper function for that.
  Thank you.</p>