I need to get the @attribute value from json using php.
I need to get toatal,surchargetotal,nightlyRateTotal,maxNightlyRate values using php .
How can I get the value using php ?
How can I get total amount 335.72 using php ?
[RateInfo] => stdClass Object
(
[@rateChange] => false
[@promo] => true
[@priceBreakdown] => true
[ChargeableRateInfo] => stdClass Object
(
[@total] => 335.72
[@surchargeTotal] => 44.42
[@nightlyRateTotal] => 291.3
[@maxNightlyRate] => 145.65
[@currencyCode] => USD
[@commissionableUsdTotal] => 291.3
[@averageRate] => 145.65
[@averageBaseRate] => 171.35
)
)
you can typecast it to an array:
you can encode to JSON then decode again as an associative array
Since you provided no other info, thats my best guess.