php - API response: Access member with hyphen in name -


i in absurd situation. using api returns me

[winner-id] => 15404899 

the way select elements api's return is:

$matches->returnelement; 

the problem can't winner-id's value cause when type

$matches->winner-id; 

it's invalid variable because of (-) sign. give me advice?

try this:

$matches->{'winner-id'}; 

Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

ios - Change Storyboard View using Seague -