• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
can an object have a 2 word name?

#1
[eluser]bill19[/eluser]
Hi,

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

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

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


Code:
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?

Thanks,

KC


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.