title: In PHP how do you access data from multidimensional arrays with multiple keys
body: <p>This is the array:</p>
  
  <pre><code>$weatherData = [
      "Chicago" =&gt; [45, "fog",   ["Mon" =&gt; [44, "fog"], "Tue" =&gt; [42, "sleet"], "Wed" =&gt; [40, "rain"], "Thu" =&gt; [44, "cloudy"], "Fri" =&gt; [45, "cloudy"]]],
      "Paris" =&gt;   [73, "sunny", ["Mon" =&gt; [75, "sunny"], "Tue" =&gt; [75, "sunny"], "Wed" =&gt; [68, "cloudy"], "Thu" =&gt; [66, "cloudy"], "Fri" =&gt; [60, "rain"]]],
      "Calgary" =&gt; [-8, "snow",  ["Mon" =&gt; [-7, "snow"], "Tue" =&gt; [-10, "snow"], "Wed" =&gt; [-3, "sleet"], "Thu" =&gt; [0, "cloudy"], "Fri" =&gt; [3, "sunny"]]]
  ];
  </code></pre>
  
  <p>I already have a function to output the general info of each city (ex: for Chicago, I outputted "45" and "fog"):</p>
  
  <pre><code>function outputBox($weatherData)
  {
      foreach ($weatherData as $key =&gt; $value) {
          echo "&lt;article class='box'";
          echo "&lt;h1&gt;$key&lt;/h1&gt;";
          echo "&lt;div class='weather'&gt;";
          echo "&lt;img src='images/$key.jpg' /&gt;";
          echo "&lt;div&gt;";
          echo "&lt;h2&gt;$value[0]&lt;/h2&gt;";
          echo "&lt;p&gt;$value[1]&lt;/p&gt;";
          echo "&lt;/div&gt;";
          echo "&lt;/div&gt;";
      }
  
      outputForecast($weatherData);
  }
  </code></pre>
  
  <p>And now I need to output the other info like for Chicago "Mon 44 fog", "Tues 42 sleet"...
  So far I got this: </p>
  
  <pre><code>function outputForecast($weatherData){
  
      foreach ($weatherData[1] as $key =&gt; $value){
          echo "&lt;section&gt;";
          echo "&lt;div&gt;";
          echo "&lt;h3&gt;$key&lt;/h3&gt;";
      }
  }
  </code></pre>
  
  <p>I don't know whats the proper code to access those numbers for my loop but it should output the mon-friday details, please help thank you!</p>