-1
私は出力配列を持っている:PHPのforeachアレイ問題
stdClass Object ([firstName] => Rupert [headline] => Managing Director at
READ Advisors [lastName] => Bowen-Jones [pictureUrl] =>
https://media.licdn.com/mpr/mprx/0_yrLwHnXDTWGSypSo-
B_NHz9hiu52pMpoOAAqHzLxpolpijIEr9zbQvllDTL1xYj6g1FvFtBsywhL)
そして、私は、各項目選び出すしようとしています:
foreach ($user_data as $key => $value) {
echo "<br />" . $value['firstName'] . "<br />";
}
をしかし、私は次のエラーを取得しています:
stdClass Object ([firstName] => Rupert [headline] => Managing Director at
READ Advisors [lastName] => Bowen-Jones [pictureUrl] =>
https://media.licdn.com/mpr/mprx/0_yrLwHnXDTWGSypSo-
B_NHz9hiu52pMpoOAAqHzLxpolpijIEr9zbQvllDTL1xYj6g1FvFtBsywhL)
Warning: Illegal string offset 'firstName' in
/home/readadvisors/readadvisors.com/auth/linkedin/callback.php on line 26
R
Warning: Illegal string offset 'firstName' in
/home/readadvisors/readadvisors.com/auth/linkedin/callback.php on line 26
M
Warning: Illegal string offset 'firstName' in
/home/readadvisors/readadvisors.com/auth/linkedin/callback.php on line 26
B
Warning: Illegal string offset 'firstName' in
/home/readadvisors/readadvisors.com/auth/linkedin/callback.php on line 26
h
あなたの助けもいただければ幸い! $のUSER_DATAを想定し ルパート
の配列である、それはあなたがそのような$ obj-> firstNameの –
使用 '$ user_data-> firstName' –