- print_r: documentation ( source)
<?php
$post_id = array((object) (array(
'post_id' => 140,
)), (object) (array(
'post_id' => 141,
)), (object) (array(
'post_id' => 142,
)));
print_r($post_id);
foreach ($post_id as $key => $value) {
$result[] = $value->post_id;
}
print_r($result);