CodeIgniter Forums

Full Version: can an object have a 2 word name?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum


I'm new to CI. I have an array of objects. Here is the first element:

Array ( [0] => stdClass Object ( [WebSite] => [Last Tested] => 14th of July, 2011 @ 3:55 EDT )

hoe can I refer to [Last Tested]. My code is:

foreach ($records as $row) {
  print($row['Last Tested']);

but when I run it I get:

Fatal error: Cannot use object of type stdClass as array .

Is there a way to fix it?