title: Get the key from an array using php
body: <p>I have an array with the following format</p>
  
  <pre><code>Array
  (
      [messages] =&gt; Array
          (
              [42321316] =&gt; 44556232
          )
  
      [text] =&gt; test message
      [count] =&gt; 1
  )
  </code></pre>
  
  <p>I am trying to get the number '42321316' using following code</p>
  
  <pre><code>foreach($results as $k=&gt;$y)
  {
      echo $results[$k];
  }
  </code></pre>
  
  <p>But it prints the values instead of getting the key of second array element.</p>