<div class="school-menu">
    <div class="container">
        <p class="school-title"> <?php the_title(); ?> </p>
        <?php if (have_rows('school-menu')) :

            while (have_rows('school-menu')) : the_row();
                $title = get_sub_field('title');
                $link = get_sub_field('link'); ?>
                <div class="menu-tab">
                    <a href="<?php if ($link) echo $link['url'] ?>" target="<?php if ($link) echo $link['target']; ?>"><?php echo $title ?></a>
                </div>
            <?php endwhile; ?>

        <?php endif; ?>
    </div>
</div>