我想從數組中檢索一個值。下面是代碼:PHP:從多個陣列獲取值
我有像數組:
$video_categories = get_the_terms(get_the_ID(), 'videos_cat', ', ');
在打印時它的結果:
Array
(
[22] => stdClass Object
(
[term_id] => 22
[name] => فيديو
[slug] => videos
[term_group] => 0
[term_taxonomy_id] => 47
[taxonomy] => videos_cat
[description] =>
[parent] => 0
[count] => 383
[object_id] => 26138
[filter] => raw
),
[23] => stdClass Object
(
[term_id] => 23
[name] => العاب
[slug] => videos
[term_group] => 0
[term_taxonomy_id] => 47
[taxonomy] => videos_cat
[description] =>
[parent] => 0
[count] => 383
[object_id] => 26138
[filter] => raw
)
)
我怎樣才能獲得的變量term_id
值打印出來?
今天,已經有2問題該問如何訪問數組的一個對象!請學習基礎知識並閱讀說明書,這不是太難,手冊也不會咬人! – Rizier123 2015-04-02 19:33:17
聽到...... – AbraCadaver 2015-04-02 19:36:22