Add formatting to Array

I’m finding it a little hard to follow based on your comments, however if you want to add a <div> around each other then change your second foreach statement to;

  foreach ($uc as $key => $value) {
    $user = get_userdata($key);
    $post_count = get_usernumposts($user->ID);
    if ($post_count) {
      $author_posts_url = get_author_posts_url($key);
      echo '<div class="class-name-here">';
      echo '<li><a href="' . $author_posts_url . '">' . $user->user_firstname . ' ' .         $user->user_lastname . '</a> (' . $post_count . ') </li>';
      echo '</div>';
    }
  }

That’s based on the assumption you want to keep the <li> element, if not, just replace that with the <div>

Update (with regards to your comment)

$args=array(
  'author' => $user->ID,
  'post_type' => 'post',
  'post_status' => 'publish',
  'posts_per_page' => 1,
  'caller_get_posts'=> 1,
  'orderby' => 'author'   //add the orderby parameter and sort by author
);

As I mentioned in my comment attached to your question above, you can try adding the orderby parameter and then assign author as its value which should sort via ID or alternatively if that does not work then replace author with $user->ID

Update 2

After running some tests on your original snippet, removing deprecated functions and adding the orderby=date parameter to your initial foreach statement (although it neither effects with or without) I am still able to retrieve a list of authors, showing their last post, then ordering all results returned by the most recent date. So if,

  • User A posts 12/10/2012
  • User B posts 15/10/2012
  • User C posts 11/10/2012

The order of results returned is,

  • User B
  • User A
  • User C

$uc=array();
$blogusers = get_users();
if ($blogusers) {
  foreach ($blogusers as $bloguser) {
    $userpost = get_posts('showposts=1&author=".$bloguser->ID."&orderby=date');
    $uc[$bloguser->ID] = '';
    if ($userpost) {
       $uc[$bloguser->ID]=$userpost[0]->post_date;
    }
  }
  arsort($uc);
  foreach ($uc as $key => $value) {
    $user = get_userdata($key);
    $post_count = count_user_posts($user->ID);
    if ($post_count) {
      $author_posts_url = get_author_posts_url($key);
        echo '<li><a href="' . $author_posts_url . '">'.$user->user_firstname . ' '  $user->user_lastname . '</a> (' . $post_count . ') </li>'
    }
  }
}

Although the above snippet could be rewritten more efficiently, it does work for me and so it should for you with relation to what you’re trying to achieve.