0
Array (
[und] => Array (
[0] => Array (
[tid] => 37
[taxonomy_term] => stdClass Object (
[tid] => 37
[vid] => 9
[name] => $10 - $20
**[description] => $10 - $20**
[format] => filtered_html
[weight] => 1
[vocabulary_machine_name] => prices
)
)
)
)
一直在嘗試這樣的事情:如何訪問此嵌套數組中的對象屬性?
print $node->field_price['und']['0']['tid']->taxonomy_term;
這就像在有對象的嵌套數組too..I'm真的不知道如何讓[說明]屬性,這似乎是內在那裏的對象。
任何幫助?請!
致命錯誤:無法使用stdClass類型的對象作爲第24行中的C:\ xampp \ htdocs \ drupal \ sites \ all \ themes \ simple7 \ node.tpl.php中的數組 – user12024
您確定您提供的問題是'var_dump($ node);'?的輸出 –
其輸出爲 – user12024