I am a complete newbie at PHP so please forgive me. I am wanting to display some data in the following format:
"Post name" - "Custom Field String (in this case, 'custom_date')"
I am currently using the following PHP code
$output .= $indent . '<li id="item_'.$page->ID.'"><span>'.apply_filters( 'the_title', $page->post_title, get_post_meta($post->ID,'item_',TRUE), $current_custom_date = $page->$custom_date ) .' - ' . $current_custom_date . '</span>';
The title and the dash are displaying perfectly. However, the Custom Field String is just displaying "Array" so now looks like this.
"Post name" - Array
How would I get this to display the custom_date correctly? I've already set get_post_meta to 'true' as you can see so that shouldn't be the problem.