title: Trying to get Key given the Value From Multi-dimensional Array
body: <p>I have an array thus (got this using <code>var_dump</code>):</p>
  
  <pre><code>array
    0 =&gt; 
      array
        'post_id' =&gt; string '6' (length=1)
    1 =&gt; 
      array
        'post_id' =&gt; string '9' (length=1)
  </code></pre>
  
  <p>I want to get the key when I have just the <code>post_id</code>. For example, I want '0' returned if I have '6' and '1' if I have '9'. I have tried:</p>
  
  <pre><code>$key = array_keys($subs, array_keys($subs[??], 6));
  </code></pre>
  
  <p>given that the <code>$subs</code> is the array. The issue is, I don't know how to iterate through the array 'within' the 'parent' array, hence, the '??'</p>