title: PHP array_search for multi dimensional array and return key
body: <p>I'm trying to search for a value in a multi dimensional array (below is only a part of the big array) and get the key for that value but I can't manage it by myself. Here is what I have tried :</p>
  
  <pre><code>Array
  (
      [0] =&gt; Array
          (
              [0] =&gt; SMEG - 30
              [1] =&gt; ALES
              [2] =&gt; -
              [3] =&gt; -
              [4] =&gt; -
              [5] =&gt; ALES
              [6] =&gt; 44-
              [7] =&gt; -
              [8] =&gt; FR*S30*E36*1*1
              [9] =&gt; FR*S30*E36*1*1
              [10] =&gt; US*S30
              [11] =&gt; Oui
              [12] =&gt; 3376
              [13] =&gt; Normale
              [14] =&gt; -
          )
  
      [1] =&gt; Array  // &lt;-- wanted key
          (
              [0] =&gt; SMEG - 30
              [1] =&gt; ALES
              [2] =&gt; -
              [3] =&gt; Chemin Des Sports
              [4] =&gt; -
              [5] =&gt; ALES
              [6] =&gt; -
              [7] =&gt; -
              [8] =&gt; FR*S30*E37*2*1  // &lt;-- wanted value
              [9] =&gt; FR*S30*E37*2*1
              [10] =&gt; FR*S30
              [11] =&gt; Oui
              [12] =&gt; 33762
              [13] =&gt; Normale
              [14] =&gt; -
          )
  
      [2] =&gt; Array
          (
              [0] =&gt; SMEG - 30
              [1] =&gt; ALES
              [2] =&gt; 0
              [3] =&gt; Ecole Des Mines
              [4] =&gt; -
              [5] =&gt; ALES
              [6] =&gt; 4-
              [7] =&gt; -
              [8] =&gt; FR*S30*E38*2*1
              [9] =&gt; FR*S30*E38*2*1
              [10] =&gt; FR*S30
              [11] =&gt; Oui
              [12] =&gt; 3376
              [13] =&gt; Normale
              [14] =&gt; -
          )
  )
  
  $key = array_search("FR*S30*E37*2*1", array_column($data, '8'));
  var_dump($data[$key]);
  </code></pre>
  
  <p>With this code I can't get the key of desired array. What am I doing wrong ?</p>