title: Retrieve first key in multi-dimensional array using PHP
body: <p>I would like to retrieve the first key from this multi-dimensional array.</p>
  
  <pre><code>Array
  (
      [User] =&gt; Array
          (
              [id] =&gt; 2
              [firstname] =&gt; first
              [lastname] =&gt; last
              [phone] =&gt; 123-1456
              [email] =&gt; 
              [website] =&gt; 
              [group_id] =&gt; 1
              [company_id] =&gt; 1
          )
  
  )
  </code></pre>
  
  <p>This array is stored in $this->data.</p>
  
  <p>Right now I am using key($this->data) which retrieves 'User' as it should but this doesn't feel like the correct way to reach the result.</p>
  
  <p>Are there any other ways to retrieve this result?</p>
  
  <p>Thanks</p>