title: Loop through nested arrays PHP
body: <p>Im trying to loop through PHP arrays decoded from a json file. I get the results but it only gives me the first results of the arrays in the the file. How can I make it loop? This is my code: </p>
  
  <pre><code>foreach ($events as $event) {
  
    echo $event['d']['Tree1'][0]['Tree2']['Field1'] . '&lt;br&gt;';
    echo $event['d']['Tree1'][0]['Tree2']['Field2'] . '&lt;br&gt;';
    echo $event['d']['Tree1'][0]['Tree2']['Field3'] . '&lt;br&gt;';
  
  }
  </code></pre>