如何从stdClass对象中检索值? [关闭]

I have the following object when i do print_r ($object):

stdClass Object

(

    [id] => 234
    [startTime] => 7:17 am
    [endTime] => 10:00 pm

)

How would I access [startTime]?

I have tried

print_r($object->systemName); 

which returns nothing (systemName is the title from the DB)

And

print_r($object[0]->systemName); 

which returns an error:

Cannot use object of type stdClass as array

You asked about startTime, but used systemName in your examples... Have you tried:

var_dump($object->startTime);

Did you try this:

print_r($object->id);

PS:Use var_dump() .. will have better results