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
Post a Comment