title: Foreach giving undefined variable error
body: <p>Bare in mind that it's late where I am so this may just be a very simple solution that I am overlooking.</p>
  
  <p>I have this foreach statement:</p>
  
  <pre><code>  &lt;? foreach ($entrees as $entree) { ?&gt;
         &lt;li&gt;
             &lt;span class="food-name"&gt;
                 &lt;?=$entree['name']?&gt;
             &lt;/span&gt;
         &lt;/li&gt;
    &lt;?}?&gt;
  </code></pre>
  
  <p>That gives an Undefined variable error for $entree. </p>
  
  <pre><code> A PHP Error was encountered
  
   Severity: Notice
  
   Message: Undefined variable: entree
  
   Filename: views/welcome_message.php
  
   Line Number: 9
  </code></pre>
  
  <p>I tried <code>print_r($entrees);</code> and the result was </p>
  
  <pre><code> Array ( [0] =&gt; Array ( [name] =&gt; Lamb [description] =&gt; A small leg of lamb ) [1] =&gt; Array ( [name] =&gt; Ham [description] =&gt; Large thing of ham ) ) 1
  </code></pre>
  
  <p>Again, this may be something stupid simple but I've been trying to 30 min and can't get it to work for the life of me. Thanks in advance for the help. </p>