当我使用函数时,我有一个名为$ results的数组:
print_r($results);
Run Code Online (Sandbox Code Playgroud)
我得到以下内容.
Array
(
[0] => ProfileElement Object
(
[name] => John thomson
[email] => johnt@gmail.com
[Bio] => 20 years of engineering expertise
[url] => http://twitter.com
)
)
Run Code Online (Sandbox Code Playgroud)
我的目标是分别回显[name] [email] [Bio] [url]值.但是当我在php中编写以下代码时,我没有得到任何值?
echo $results[0]["ProfileElement Objects"]["Bio"];
Run Code Online (Sandbox Code Playgroud)
有谁知道为什么?这不是数组中的数组吗?