So, I am angry about this array, the 2nd day gives me pain in * ....
I am developing an OOP PHP script.
I get an array:
Array ( [0] => Project Object ( [project_id] => 1 [title] => Some Name [date] => 2011-10-20 [place] => Some City [customer] => 1 [proj_budget] => [manager] => 1 [team] => 1 [currency] => 1 ) )
When I try to do this:
<?php $project = new Project(); $projects = $project->findAll(); print_r($projects); foreach ($projects as $temptwo) { echo $temptwo['title'].", \n"; } ?>
I get this:
Fatal error: Cannot use object of type Project as array
Why in the world? what does he want from me?
source share