0
0

More than 3 years have passed since last update.

配列内のオブジェクトの(プロパティの)取り出し

Last updated at Posted at 2021-03-22

引用元
https://www.yuulinux.tokyo/14877/

dd($attr)

..array:1 [
0 => {#2063
+"is_kawaii": 1 ←●
}
]

アクセス方法
echo $attr[0]->is_kawaii; // 1

考え方
array直下のものはkey
{key: value}についてはプロパティでアクセスする

0
0
2

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0