Arrays - foreach brings ->Fatal error: Cannot use object of type
<p>So, I'm mad about this Arrays, 2nd day givin me pain in <em>*</em>.... </p>

<p>I'm developing an OOP PHP script.</p>

<p>I'm getting an array:</p>

<pre><code>Array ( [0] =&gt; Project Object ( [project_id] =&gt; 1 [title] =&gt; Some Name [date] =&gt; 2011-10-20 [place] =&gt; Some City [customer] =&gt; 1 [proj_budget] =&gt; [manager] =&gt; 1 [team] =&gt; 1 [currency] =&gt; 1 ) )
</code></pre>

<p>When I'm trying to do this:</p>

<pre><code>&lt;?php
    $project = new Project();
    $projects = $project-&gt;findAll();
    print_r($projects);
    foreach ($projects as $temptwo) {
      echo $temptwo['title'].", \n";
    }
?&gt;
</code></pre>

<p>I'm getting this:</p>

<pre><code>Fatal error: Cannot use object of type Project as array
</code></pre>

<p>Why in the world? what does it want from me?</p>
