<div class="vertical_menu">
    <ul>
    <?php
        if(!empty($menu_items) && is_array($menu_items))
            foreach($menu_items as $k=>$v)
                echo '<li><a href="'.$v['link'].'" class="'.$v['class'].'">'.$v['elementname'].'</a></li>';
    ?>
    </ul>
</div>