<ul id="admin-menu-ul" class="sf-menu">
    <?php foreach ($items as $item): ?>
    <li>
        <?php if (empty($item['sub'])): ?>        
        <a href="<?php echo htmlspecialchars($item['link']) ?>"><?php echo $item['title'] ?></a>
        <?php else: ?>
        <a href="<?php echo htmlspecialchars($item['link']) ?>"><?php echo $item['title'] ?></a>
        <ul>
            <?php foreach ($item['sub'] as $subitem): ?>
            <li><a href="<?php echo htmlspecialchars($subitem['link']) ?>"><?php echo $subitem['title'] ?></a></li>
            <?php endforeach; ?>
        </ul>
        <?php endif; ?>
    </li>
    <?php endforeach; ?>
</ul>