title: PHP - Array value access
body: <p>I have defined arrays in my Symfony PHP function like:</p>
  <pre><code>public function getStats()
  {
      return [
          'mainStats' =&gt; [
              'total' =&gt; $this-&gt;getTotal(),
              'balance' =&gt; $this-&gt;getBalance(),
          ],
          'all' =&gt; $this-&gt;getAll()
      ];
  }
  </code></pre>
  <p>How can I access them so I can work with values. Like:</p>
  <pre><code>this-&gt;getStats()[0];
  </code></pre>