Please help me pull this into a php variable... I have the following json decoded code:
"account_id":12345,
"name":"Example account",
"state":"active",
"balances":[
{
"currency":"USD",
"balance":390.50,
"incoming_pending_amount":635.30,
"outgoing_pending_amount":210.00,
"reserved_amount":0,
"disputed_amount":0,
"withdrawal_period":"daily",
"withdrawal_next_time":1370112217,
"withdrawal_bank_name":"WellsFargo XXXXX3102"
}
I want to bring out the balance into a php variable and am not sure how to.
when I do
foreach ($accounts as $a)
I can echo $a->account_id just fine - but when I try to echo $a->balances->balance it does not give me the 390.50 for the result...
any kind of help I can get on this is great appreciated!