title: To retrieve a particular index of an array in PHP 2- dimension array?
body: <p>I have an array of this kind </p>
  
  <p>In the below mentioned array i have to find the index of the array having meta_key as data2</p>
  
  <pre><code>Array ( [0] =&gt; Array  ( [meta_id] =&gt; 43
                          [post_id] =&gt; 12
                          [meta_key] =&gt; job
                          [meta_value] =&gt; 11
                        )
          [1] =&gt; Array  ( [meta_id] =&gt; 44
                          [post_id] =&gt; 12
                          [meta_key] =&gt; data2
                          [meta_value] =&gt; Vinodh
                        )
          [2] =&gt; Array  ( [meta_id] =&gt; 45 
                          [post_id] =&gt; 12
                          [meta_key] =&gt; data3
                          [meta_value] =&gt; Kumar
                        )
          [3] =&gt; Array  ( [meta_id] =&gt; 46 
                          [post_id] =&gt; 12 
                          [meta_key] =&gt; data4 
                          [meta_value] =&gt; vinodh@rnftechnologies.com 
                        )
          [4] =&gt; Array  ( [meta_id] =&gt; 47 
                          [post_id] =&gt; 12 
                          [meta_key] =&gt; data6 
                          [meta_value] =&gt; Murugeshpalya 
                        )
          [5] =&gt; Array  ( [meta_id] =&gt; 48 
                          [post_id] =&gt; 12 
                          [meta_key] =&gt; data7 
                          [meta_value] =&gt; Bangalore 
                        ) 
          [6] =&gt; Array  ( [meta_id] =&gt; 49 
                          [post_id] =&gt; 12 
                          [meta_key] =&gt; data8 
                          [meta_value] =&gt; 560031 
                        ) 
          [7] =&gt; Array  ( [meta_id] =&gt; 50 
                          [post_id] =&gt; 12 
                          [meta_key] =&gt; data9 
                          [meta_value] =&gt; India 
                        ) 
          [8] =&gt; Array  ( [meta_id] =&gt; 51 
                          [post_id] =&gt; 12 
                          [meta_key] =&gt; data11 
                          [meta_value] =&gt; 9638527410 
                        ) 
          [9] =&gt; Array  ( [meta_id] =&gt; 52 
                          [post_id] =&gt; 12 
                          [meta_key] =&gt; data13 
                          [meta_value] =&gt; Yes 
                        ) 
          [10] =&gt; Array ( [meta_id] =&gt; 53 
                          [post_id] =&gt; 12 
                          [meta_key] =&gt; data14 
                          [meta_value] =&gt; VTU 
                        ) 
          [11] =&gt; Array ( [meta_id] =&gt; 54 
                          [post_id] =&gt; 12 
                          [meta_key] =&gt; data15 
                          [meta_value] =&gt; B.E. 
                        ) 
          [12] =&gt; Array ( [meta_id] =&gt; 55 
                          [post_id] =&gt; 12 
                          [meta_key] =&gt; data18 
                          [meta_value] =&gt; I have read and understood the privacy policy. 
                        ) 
          [13] =&gt; Array ( [meta_id] =&gt; 76 
                         [post_id] =&gt; 12 
                         [meta_key] =&gt; interview 
                         [meta_value] =&gt; 15 
                        ) 
          [14] =&gt; Array ( [meta_id] =&gt; 77 
                          [post_id] =&gt; 12 
                          [meta_key] =&gt; rating 
                          [meta_value] =&gt; 0 
                        ) 
          [15] =&gt; Array ( [meta_id] =&gt; 79 
                          [post_id] =&gt; 12 
                          [meta_key] =&gt; interview 
                          [meta_value] =&gt; 16 
                        ) 
          [16] =&gt; Array ( [meta_id] =&gt; 82 
                          [post_id] =&gt; 12 
                          [meta_key] =&gt; contactmail 
                          [meta_value] =&gt; 17 
                        )
        ) 
  </code></pre>
  
  <p>Thanks in advance</p>