我创建了一个数组,我想访问该值,但我真的不知道如何:
这是我的阵列:
Array
(
[0] => Array
(
[id] => 1
[id_orga] => 36094152
[nom] => Adresse externe
[url] => https://cubber.zendesk.com/api/v2/organizations/36094152.json
[created] => 2015-01-22 08:00:53
[updated] => 2015-01-22 08:00:53
[tickets] => Array
(
)
[monthly] => Array
(
[0] => ArrayObject Object
(
[storage:ArrayObject:private] => Array
(
[assist] => 0
[maint] => 0
[total] => 0
)
)
我希望例如访问值" 0"在关键"协助"并将其更改为" 1"例如,我不知道该怎么做。
答案 0 :(得分:-1)
假设源数组被称为$myArray
。尝试:
$myArray[0]['monthly'][0]->storage['assist'] = 1
如果不起作用,请尝试:
$myArray[0]['monthly'][0]['storage']['assist'] = 1
让我知道哪些有用,所以我删除了另一个。