0
stdClass Object
(
[Transaction] => stdClass Object
    (
        [Reference1] => 001
        [Reference2] => 
        [Reference3] => 
        [Reference4] => 
        [Reference5] => 
    )

[Notifications] => stdClass Object
    (
    )

[HasErrors] => 
[Shipments] => stdClass Object
    (
        [ProcessedShipment] => stdClass Object
            (
                [ID] => 3702106321
                [Reference1] => Shpt 0001
                [Reference2] => 
                [Reference3] => 
                [ForeignHAWB] => 
                [HasErrors] => 
                [Notifications] => stdClass Object
                    (
                    )

                [ShipmentLabel] => stdClass Object
                    (
                        [LabelURL] => http://www.sandbox.aramex.com/content/rpt_cache/cc1703518ef04f13873f8c2a2fab04fb.pdf
                        [LabelFileContents] => 
                    )
            )
    )

)

Can anyone help me how do I retrieve the value of ID?

1
  • For PHP Object you use Object->Key Commented May 27, 2015 at 15:36

1 Answer 1

2

Something like this:

$your_object->Shipments->ProcessedShipment->ID

where, $your_object contains your response, that you posted here.

Sign up to request clarification or add additional context in comments.

1 Comment

Its not working. It generates an error "Notice: Trying to get property of non-object"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.