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
)
)
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
)
)
$ob1 = new stdClass();
$ob1->term_id = 43;
$ob2 = new stdClass();
$ob2->term_id = 25;
$scope = array($ob1,$ob2);
foreach($scope as $o){
echo $o->term_id.'<br/>';
}
// Out
// 43
// 25