how to get the key of an item of the array inside foreach loop in php : <p>Below is the example of the array that I have.   </p>

<pre><code>  Array (
[952] =&gt; Array ( [Date] =&gt; 2016-06-23 01:55:17 [SValues] =&gt; Array ( [total] =&gt; 1 [Name] =&gt; Name [OverAge] =&gt; No))
[91] =&gt; Array ( [Date] =&gt; 2016-06-23 01:55:17 [SValues] =&gt; Array ( [total] =&gt; 1  [Name] =&gt; Name [OverAge] =&gt; No))
[83] =&gt; Array ( [Date] =&gt; 2016-06-23 01:55:17 [SValues] =&gt; Array ( [total] =&gt; 1 [Name] =&gt; Name [OverAge] =&gt; No)))
</code></pre>

<p>And then, I put this array inside the foreach loop.</p>

<pre><code>foreach($the-main-array as $item)
{
          //I want to get the key of the item here (952,91,83)
}
</code></pre>

<p>So how can I get the key of the item inside the loop?</p>

<p>Please help me. Thanks in advance.</p>
