Glad I could help, but I think you still have to unserialize the $myvalues prior to looping into the foreach.
Try this:
$grabMeta = get_post_meta( $post->ID, 'my_key', true );
$myvalues = unserialize( $grabMeta );
foreach ( $myvalues as $myvalue ) {
echo $myvalue .', ';
}
I think this is what you’ll want to do:
$myvalues = unserialize( get_post_meta($post->ID,'my_key') );
foreach ($myvalues as $myvalue) {
echo $myvalue .', ';
}
The value a:4:{i:0;s:7:”value_1″;i:1;s:7:”value_2″;i:2;s:7:”value_3″;i:3;s:7:”value_4″;} that you returning is just a serialized or stringified version of the php array that you want to loop through.