The function below lists posts based on custom field.
The result is involved in a list <li></li>. What I would like to do is count how many list items there are, then divide it into two ul's. Is there any way to split the result into two columns?

function article_series() {
global $post;
$series = get_post_meta($post->ID, 'Series', true);
if($series) :
$args = array(
'numberposts' => -1,
'meta_key' => 'Series',
'meta_value' => $series,
);
$series_posts = get_posts($args);
if($series_posts) :
$class = preg_replace("/[^a-z0-9\\040\\.\\-\\_\\\\]/i", "", $series);
$class = strtolower(str_replace(array(' ', ' '), '-', $class));
echo '<div class="series series-' . $class . '"><h4 class="series-title">' . __('Articles in this series') . '</h4><ul>';
foreach($series_posts as $serial) :
if($serial->ID == $post->ID)
echo '<li class="current-post">' . $serial->post_title . '</li>';
else
echo '<li><a href="' . get_permalink($serial->ID) . '" title="' . str_replace('"', '"', $serial->post_title) . '">' . str_replace('"', '"', $serial->post_title) . '</a></li>';
endforeach;
echo '</ul></div>';
endif;
endif;
Function created by justintadlock.com
Thanks for any help.
