这是我结构的一部分,我想要做的是'd'值是空的所以我想用值'xky'替换'd'值。请帮助我如何替换该值而不分裂和构建结构。
Array
(
[0] => stdClass Object
(
[a] => 1
[b] => 1B
[c] => DEL
[d] =>
[e] => 2015-01-08T0555
[f] => BOM
[g] => t
[h] => XYZ
[i] => 2015-01-08T0815
[j] => 1C
[k] => 851
)
)
注意:为什么我要说的是,如果我拆分它会给我带来很多麻烦,因为这只是结构的一部分。请帮帮忙。
Array
(
[0] => stdClass Object
(
[a] => 1
[b] => 1B
[c] => DEL
[d] => xky
[e] => 2015-01-08T0555
[f] => BOM
[g] => t
[h] => XYZ
[i] => 2015-01-08T0815
[j] => 1C
[k] => 851
)
)
答案 0 :(得分:1)
那样的东西?
$array[0]->d = 'xky'