我似乎无法从对象中的数组中获取特定数据。如何从对象中的数组中获取数据
$this->fields->adres
得到正确的地址,但我不能得到更深层次。
我已经试过:
$this->fields->province
$this->fields->province->0
$this->fields->province[0]
和:(编辑)
$this->fields["province"][0]
$this->fields['province'][0]
$this->data->fields['province'][0]
但它不会返回任何东西,同时它应该返回 “弗莱福兰”。
低于对象的print_r($此,TRUE)的第一部分:
RSMembershipModelSubscribe Object
(
[_id] => 2
[_extras] => Array
(
)
[_data] => stdClass Object
(
[username] => testzz
[name] => testzz
[email] => [email protected]
[fields] => Array
(
[province] => Array
(
[0] => Flevoland
)
[plaats] => tesdt
[adres] => test
在语言上是一致的。使用“城市”和“地址”;) –