I am trying to retrieve a value from an Array. Here is the code:
I have array like:
$video_categories = get_the_terms( get_the_ID(), 'videos_cat', ', ' );
when print it the result:
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
)
)
How can I get the value of term_id
in variable to print it?