how to get value of stdClass Object foreach loop

stdClass Object
(
    [meta_id] => 11
    [post_id] => 8
    [meta_key] => wpp_gpid
    [meta_value] => gpid_1124779119
)
stdClass Object
(
    [meta_id] => 12
    [post_id] => 8
    [meta_key] => _edit_last
    [meta_value] => 1
)
stdClass Object
(
    [meta_id] => 13
    [post_id] => 8
    [meta_key] => _edit_lock
    [meta_value] => 1346228510:1
)
stdClass Object
(
    [meta_id] => 16
    [post_id] => 8
    [meta_key] => _thumbnail_id
    [meta_value] => 9
)

This is print_r value of
$poster_meta = $wpdb->get_results("SELECT * FROM $wpdb->postmeta WHERE post_id = '{$poster}'");

How do i get the meta_value of meta_key = thumbnail and meta_key = _edit_last

Related posts

Leave a Reply

2 comments

  1. if you want to get meta key value in wordpress then

    try this code:-

    $team_counter = get_post_meta($post->ID, 'team_counter', true);
    

    get_post_meta is wordpress library default function