Please I have to set the value of a key in a multi-dimensional array to a variable, please how to i point to the value using the key name since it is unique, I wish to use the value of the amount in the array in a variable, here is my code below:

    array:3 [▼
  "status" => true
  "message" => "Verification successful"
  "data" => array:24 [▼
    "id" => 166100109
    "domain" => "live"
    "status" => "success"
    "reference" => "2gvToMGNNj4k2iQPZ1YaSo2Uz"
    "amount" => 10000
    "message" => null
    "gateway_response" => "Approved"
    "paid_at" => "2019-05-05T12:47:02.000Z"
    "created_at" => "2019-05-05T12:45:48.000Z"
    "channel" => "card"
    "currency" => "NGN"
    "ip_address" => "105.112.74.234"
    "metadata" => ""
    "log" => array:9 [▶]
    "fees" => 150
    "fees_split" => null
    "authorization" => array:12 [▶]
    "customer" => array:8 [▶]
    "plan" => null
    "paidAt" => "2019-05-05T12:47:02.000Z"
    "createdAt" => "2019-05-05T12:45:48.000Z"
    "transaction_date" => "2019-05-05T12:45:48.000Z"
    "plan_object" => []
    "subaccount" => []
  ]
]

0 Answers