How to get data from array in object

后端 未结 5 1271
情书的邮戳
情书的邮戳 2021-01-23 15:01

I can\'t seem to get specific data from an array inside an object.

$this->fields->adres gets the address correctly, but i can\'t get a level deeper.

5条回答
  •  执念已碎
    2021-01-23 15:12

    You can also use type casting.

    $fields = (array) $this->data->fields;
    echo $fields['province'][0];
    

提交回复
热议问题