<?php
$ck = get_post_custom_keys($post_id); //Array
foreach ($ck as $k) {
if (substr ($k, 0, 1) == '_')
{ // skip keys starting with '_'
continue;
}
$cv = get_post_custom_values($k, $post_id ); //Array
foreach ($cv as $c) {
if (empty ($c))
{ // skip empty value
continue;
}
echo ($k . ': ' . $c . '<br/>');
}
}
?>