oop - How can I retrieve properties from this object by PHP? -


this question has answer here:

i have object responded expedia api.

[surcharges] => stdclass object (     [@size] => 1     [surcharge] => stdclass object         (             [@type] => taxandservicefee             [@amount] => 9.59         )  ) 

how can retrieve @type vĂ  @amount properties.

i tried width surcharges->surcharge->type or surcharges->surcharge->@type not success

try

surcharges->surcharge->{"@type"} 

Comments

Popular posts from this blog

How has firefox/gecko HTML+CSS rendering changed in version 38? -

javascript - Complex json ng-repeat -

jquery - Cloning of rows and columns from the old table into the new with colSpan and rowSpan -