我从 postmeta 获取 post _ id:
$post_id = $wpdb->get_results("SELECT post_id FROM $wpdb->postmeta WHERE (meta_key = 'mfn-post-link1' AND meta_value = '". $from ."')");
当我尝试 print_r($post_id);
我有这样的数组:
Array
(
[0] => stdClass Object
(
[post_id] => 140
)
[1] => stdClass Object
(
[post_id] => 141
)
[2] => stdClass Object
(
[post_id] => 142
)
)
我不知道如何遍历它,我怎么能得到这样的数组
Array
(
[0] => 140
[1] => 141
[2] => 142
)
知道我该怎么做吗?