I want to fetch only 'email' values, right now whole array is getting fetched.
0 => a:3:{s:4:"name";s:5:"Test3";s:5:"email";s:29:"test3@gmail.com";s:7:"message";s:4:"Test message";}
Code:
<?php
global $post;
$post = $wp_query->post;
$id = $post->ID;
$custom_fields = get_post_custom($id);
$my_custom_field = $custom_fields['offer'];
foreach ( $my_custom_field as $key => $value ) {
echo $key . " => " . $value . "<br />";
} ?>