How do I loop through this array and get all the term_id's?
Array (
[0] => stdClass Object (
[term_id] => 43
)
[1] => stdClass Object (
[term_id] => 25
)
)
Cheers, Adnan
|
|||||||||
|
Each element of your array is an regular object, so yo can access it just by For:
Foreach:
If you want to add all ids to another array, you just need to write following code (in example for foreach):
|
|||
|
foreach ($arr as $item) { var_dump($item); }
– zerkms Jan 12 at 20:41