0

I have a response that provides an array in this format

Array (
    [error] => Array (
        [code] => BAD_REQUEST_ERROR 
        [description] => Payment failed 
        [metadata] => Array ( 
            [payment_id] => pay_EVI7BJdvs2uxtq 
            [order_id] => order_EVI6zC5ScMjejv 
        )
    )
)

How can i access the code and description from this multidimensional array ?

Nick
  • 138,499
  • 22
  • 57
  • 95
  • `$array['error']['code']` and `$array['error']['description']` – Nick Mar 22 '20 at 23:24
  • Does this answer your question? [PHP - Accessing Multidimensional Array Values](https://stackoverflow.com/questions/17139453/php-accessing-multidimensional-array-values) – Nick Mar 22 '20 at 23:25

0 Answers0