title: php foreach loop from multidimensional array
body: <p>I have a multidimensional array which I want to display in a foreach loop. I've been looking at lots of tutorials but I haven't been able to make it work yet.</p>
  
  <p>This is my array and foreach loop:</p>
  
  <pre><code>$events = array( 
             array( Name =&gt; "First Event", 
                    Date =&gt; "12/13/14",
                    Time =&gt; "12:13"
                    Description =&gt; "event description"
                  ),
             array( Name =&gt; "Second Event", 
                    Date =&gt; "12/13/14",
                    Time =&gt; "12:13",
                    Description =&gt; "event description"
                  ),
             array( Name =&gt; "Third Event", 
                    Date =&gt; "12/13/14",
                    Time =&gt; "12:13"
                    Description =&gt; "event description"
                  )
           );
  
  foreach($events as $event) {
      echo "&lt;div class=\"event\"&gt;&lt;strong&gt;";
      echo $event[Name];
      echo "&lt;/strong&gt;&lt;em&gt;";
      echo $event[Date] . " at " . $event[Time];
      echo "&lt;/em&gt;&lt;div&gt;";
      echo $event[Description];
      echo "&lt;/div&gt;&lt;/div&gt;";
  }
  </code></pre>
  
  <p>and here is how I want it to display: </p>
  
  <pre><code>&lt;div class="event"&gt;
    &lt;strong&gt;Event Name&lt;/strong&gt;&lt;em&gt;Date at Time&lt;/em&gt;
    &lt;div&gt;
      Description 
    &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>I would appreciate any help you could give. Thanks!</p>