ACF Pro select field problem [closed]

You can loop through your ACF options by using the code below.

<?php if( have_rows('social_medias', 'option') ):

    while ( have_rows('social_medias', 'option') ) : the_row(); 

      $type = get_sub_field('type'); ?>


          <?php if ($type == "facebook") { ?>

                <li>
                     <a href="#">
                             <svg viewbox="0 0 6.5 14" xmlns="http://www.w3.org/2000/svg">
                             <path class="st0" d="M1.4 14h2.9v-7h2l.2-2.5h-2.2v-1.4c0-.3.2-.6.5-.7h1.7000000000000002v-2.4h-2.2c-1.5-.1-2.8 1-2.9 2.5v2h-1.4v2.5h1.4v7z" id="Layer_3"></path></svg>
                     </a>
              </li>

          <?php } elseif ($type == "twitter") { ?>

                <li>
                     <a href="#">
                             <svg viewbox="0 0 6.5 14" xmlns="http://www.w3.org/2000/svg">
                             <path class="st0" d="M1.4 14h2.9v-7h2l.2-2.5h-2.2v-1.4c0-.3.2-.6.5-.7h1.7000000000000002v-2.4h-2.2c-1.5-.1-2.8 1-2.9 2.5v2h-1.4v2.5h1.4v7z" id="Layer_3"></path></svg>
                     </a>
                </li>

            <?php } elseif ($type == "google") { ?>

                <li>
                     <a href="#">
                             <svg viewbox="0 0 6.5 14" xmlns="http://www.w3.org/2000/svg">
                             <path class="st0" d="M1.4 14h2.9v-7h2l.2-2.5h-2.2v-1.4c0-.3.2-.6.5-.7h1.7000000000000002v-2.4h-2.2c-1.5-.1-2.8 1-2.9 2.5v2h-1.4v2.5h1.4v7z" id="Layer_3"></path></svg>
                     </a>
                </li>


<?php   } endwhile; endif; ?>