我有以下stdClass,如何在里面打印对象数据?
Array
(
[USD] => stdClass Object
(
[15m] => 94.60177
[last] => 94.60177
[buy] => 94.61019
[sell] => 94.66024
[24h] => 94.51
[symbol] => $
)
[CNY] => stdClass Object
(
[15m] => 580.38036
[last] => 580.38036
[buy] => 569.24441
[sell] => 593.90802
[24h] => 577.26
[symbol] => ¥
)
)
我需要访问例如USD-> 15m
试过像$blockchain_array->USD->15m
这样没有运气的东西。
谢谢!
答案 0 :(得分:2)
你走了。
echo $blockchain_array['USD']->{'15m'};
答案 1 :(得分:1)
$blockchain_array['USD']->{'15m'}