title: No returned variable value when querying IF statement
body: <p>I've added a value to <code>$old_pdf1</code>, var dumped it to test and yep it's there. So I then added the elseif statement but now it will no longer show.</p>
  
  <p>If I var_dump before the elseif statement it shows the URL I want, if I put it at the end it doesn't return anything.</p>
  
  <pre><code>&lt;?php
  
  $old_pdf1 = get_field('old_pdf_file_1');
  
  if( have_rows('pdf_files') ): ?&gt;
  
      &lt;ul&gt;
  
      &lt;?php while( have_rows('pdf_files') ): the_row(); ?&gt;
  
          &lt;li&gt;&lt;?php the_sub_field('case_study_pdf'); ?&gt;&lt;/li&gt;
  
      &lt;?php endwhile; ?&gt;
  
      &lt;/ul&gt;
  
  &lt;?php
  
      elseif( !empty($old_pdf1) ):
      the_field('old_pdf_file_1');
  ?&gt;
  
  &lt;?php endif; ?&gt;
  </code></pre>