I'm looking to get 5 wordpress groups to show a certian way. I've images mounted on each category using a wordpress plugin

This Is How I want so that it is displayed.

[category] [blank] [category]

[blank] [category] [blank]

[category] [blank] [category]

I've the next code to show into posts

 $get_cats = wp_list_categories( 'echo=0&title_li=&depth=1&include=16,15,17,18,20' );
     $cat_array = explode('</li>',$get_cats);
     $results_total = count($cat_array);
     $cats_per_list = ceil($results_total / 3);
     $list_number = 0;
     $result_number = 0;
<ul class="category_footer_post" id="cat-col-<?php echo $list_number; ?>">

<?php
    foreach($cat_array as $category) {
    $result_number++;

    if($result_number % $cats_per_list == 0) {
    $list_number++;
    echo $category.'</li>
    </ul>

    <ul class="category_footer_post" id="cat-col-'.$list_number.'">';
 }

else {
    echo $category.'</li>';
    }
} ?>
</ul>

What else can one do to make this happen?