title: How to iterate through multidimentional array and show Index
body: <p>I am writing a program where i am using Multi-dimensional array. The concept will enter the subject name and index will be shown that who student is studying that subject. </p>
  
  <pre><code>$var= [ 'Abdullah'=&gt;['full_name'=&gt;'Abdullah_Faraz',
                   'Subject'=&gt;['English','Urdu','Maths']],
  
      'Hamid'=&gt;['full_name'=&gt;'Hamid_Amjad', 
                   'Subject'=&gt;['PHP','Urdu','C++']],
  
      'Abid'=&gt;['full_name'=&gt;'Abid_Ali',
                   'Subject'=&gt;['OOP','OS','Calculus']],
  
      'Aqeel'=&gt;['full_name'=&gt;'Aqeel_Bhutta',
                   'Subject'=&gt;['Economics','Statistics','Big_Data']]  
  </code></pre>
  
  <p>];</p>
  
  <pre><code>foreach ($var as $key =&gt; $value) {
   foreach ($value as $key1 =&gt; $value1) {
      foreach ($value1 as $value2) {
  
          if($value2='Urdu'){
              echo $key;
      }       
  }
  }
  </code></pre>
  
  <p>Output
       Abdullah
       Hamid</p>
  
  <p>but now i want to show the index of those who are not studying Urdu the expected outcome should be</p>
  
  <pre><code> Abid
   Aqeel
  </code></pre>
  
  <p>But i don't know how to achieve this.</p>