Hyphens in Keys of Object

后端 未结 1 573
一向
一向 2020-12-16 17:30

I have an stdClass Object like this:

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

I am trying to retrieve the value like t

相关标签:
1条回答
  • 2020-12-16 18:16
    echo $objectName->{'key-west'};
    
    0 讨论(0)
提交回复
热议问题