views:

23

answers:

1

I have an stdClass Object like this:

stdClass Object ( [key-west] => 1 [disney-land] => 1 ) 

I am trying to retrieve the value like this:

$objectName->key-west

but the value returned is 0. Why? and How can I retrieve it as 1?

Thanks

+2  A: 
echo $objectName->{'key-west'};
nc3b
genius ! thanks :)
Vincent