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['email'] . " => " . $value['email'] . "<br />"; }
0 => s:94:"a:3:{s:4:"name";s:10:"Sanad Qazi";s:5:"email";s:14:"test@sanad.com";s:7:"message";s:4:"test";}";
<?php global $post; $post = $wp_query->post; $id = $post->ID; $custom_fields = get_post_custom($id); $email = unserialize($custom_fields)['email']; echo $email; ?>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)