在 wordpress 中,我有一个这样的数据结构:
array
49 =>
object(stdClass)[272]
public 'ID' => int 49
...
// I need this guid
public 'guid' => string 'http://localhost/github/wordpress/wp-content/uploads/2012/09/3.png' (length=66)
...
47 =>
object(stdClass)[275]
46 =>
object(stdClass)[276]
public 'ID' => int 46
...
public 'filter' => string 'raw' (length=3)
我正在尝试访问guid
并且这有效:
$temp121212 = get_children($post->ID);
echo $temp121212[49]->guid;
但这不是:
echo get_children($post->ID)[49]->guid;
我究竟做错了什么?不能这样吗?