0
在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)
我試圖訪問和這個作品:
$temp121212 = get_children($post->ID);
echo $temp121212[49]->guid;
但這並不:
echo get_children($post->ID)[49]->guid;
我在做什麼錯?這不能這樣做嗎?