<?php global $wp_query;$postid = $wp_query->post->ID;$item = get_post_meta($postid, 'lunch menu', true);?><ul> <?phpforeach( $item as $items){echo '<li>'.$items."</li>";}wp_reset_query();?></ul>
$string = 'Pizza, Piatti al forno, Insalata, Toppings, Pagnottelle';$arr = explode(', ', $str);for($i = 0; $i < count($arr); $i++) { echo '<li> ' .$arr[$i] . "</li>";};
global $wp_query;$postid = $wp_query->post->ID;$item = get_post_meta($postid, 'lunch menu', true);$items = explode(",", $item);?><ul><?phpforeach($items as $menu) { echo '<li>'.$menu."</li>";}wp_reset_query();
Pizza, Piatti al forno, Insalata, Toppings, Pagnottelle,
I tried using explode() to echo it out into an unordered list using the comma as the delimeter but all I could get was
Array
or
Array ( [0] => Array )
So I set it back to get the values above. Here is what I have right now