我有一個API,它以數組的形式返回響應。我想從這個數組中提取元素並將它們保存在我的數據庫中。我曾嘗試使用爆炸功能,但似乎我缺少一些東西。以下是來自檢索的確切示例響應。如何將數組值複製到單個變量中
Array
(
[Response] => Array
(
[external_reference] => bablaba
[withdraw_request_id] => babalalal
[amount] => bababababa
[status] => ababababab
[message] => ababababa.
[new_balance] => babababa
[amount_sent] => ababababa
[currency_sent] => ababababa
[charge_amount] => ababababa
[charge_currency] => babababa
[currency] => abababaab
)
)
郵編你已經嘗試 – Apb
$ new_variable = $陣列[ '響應'] [ '貨幣']; echo $ new_variable; – JYoThI