Display array data

0

I need to display the data for this array and I'm not sure how to place the call. I would like to get specific data like [Postage] => 140.55

[0] => SimpleXMLElement Object
                    (

                        [@attributes] => Array
                            (
                                [ID] => 12
                            )

                        [Pounds] => 2
                        [Ounces] => 0
                        [Machinable] => True
                        [MailType] => Package
                        [Container] => RECTANGULAR
                        [Size] => REGULAR
                        [Width] => 2
                        [Length] => 2
                        [Height] => 2
                        [Girth] => 0
                        [Country] => BRAZIL
                        [Postage] => 140.55
                        [ExtraServices] => SimpleXMLElement Object
                            (
                                [ExtraService] => SimpleXMLElement Object
                                    (
                                        [ServiceID] => 106
                                        [ServiceName] => Insurance
                                        [Available] => True
                                        [Price] => 1.00
                                        [DeclaredValueRequired] => True
                                    )

                            )

                        [ValueOfContents] => 200.00
                        [SvcCommitments] => 1 - 3 business days to many major markets
                        [SvcDescription] => USPS GXG<sup>™</sup> Envelopes
                        [MaxDimensions] => USPS-Produced regular size cardboard envelope (12-1/2" x 9-1/2"), the legal-sized cardboard envelope (15" x 9-1/2") and the GXG Tyvek envelope (15-1/2" x 12-1/2")
                        [MaxWeight] => 70
                    )
    
asked by anonymous 05.10.2018 / 16:49

1 answer

-1

Simply access the zero position of the array and the attribute.

$ var [0] -> Postage;

    
10.10.2018 / 19:32