Class returns object convert it to array...
Posted: Thu Jul 05, 2007 7:00 pm
My USPS Class returns the following from a print_r($price);
How can I get the rate? I tried echo($price['list']['0']['rate']); but nothing returned
Code: Select all
usps Object
(
[server] => http://production.shippingapis.com/ShippingAPI.dll
[user] => 000XXXXX9999
[pass] =>
[service] => PRIORITY
[dest_zip] => 20008
[orig_zip] => 32186
[pounds] => 10
[ounces] => 5
[container] =>
[size] => Regular
[machinable] => true
[country] => USA
[zone] => 5
[list] => Array
(
[0] => price Object
(
[mailservice] => Priority Mail
[rate] => 17.95
)
)
)