title: How to get the index of parent array
body: <p>I'm trying to get the index of the parent array by id.</p>
  
  <p>My array has an array of products which consists of the id and the amount.
  I whish to change the amount of the selected product and this would work best with the id because this is a unique value.</p>
  
  <pre><code>Array ( 
  [0] =&gt; Array ( [0] =&gt; 3 [1] =&gt; 1 ) 
  [1] =&gt; Array ( [0] =&gt; 36 [1] =&gt; 6 ) 
  [2] =&gt; Array ( [0] =&gt; 4 [1] =&gt; 10 ) 
  [3] =&gt; Array ( [0] =&gt; 37 [1] =&gt; 10 ) )
  </code></pre>