title: ACF - How not to show data if the field is empty
body: <p>this is my code (it is a bit messy, I'm sorry, I'm still a beginner). I'm using ACF (in WordPress), and what I'm trying to do is display certain data to certain logged-in users (for example: user1 has a table filled with different data compared to user2). If user1 has empty able - the table shouldn't be shown. That's why I'm checking the sub-field 'first'. If it's not empty, show all the following data that comes from the code. What am I doing wrong? Maybe I'm messing up with mixing PHP with HTML, I don't know. I'm faced with ACF and PHP for the first time.</p>
  
  <p>I am grateful for any given help. Thank you in advance.  </p>
  
  <pre><code>&lt;?php 
  $first = get_sub_field( 'first' );
  
  if( ! empty( $first ) ) : ?&gt;
      &lt;h4&gt;My heading&lt;/h4&gt;
      &lt;div class="table-responsive"&gt;
          &lt;table class="table table-bordered"&gt;
              &lt;thead&gt;
                  &lt;tr&gt;
                      &lt;th&gt;First&lt;/th&gt;
                      &lt;th&gt;Second&lt;/th&gt;
                  &lt;/tr&gt;
              &lt;/thead&gt;
              &lt;tbody&gt;
                  &lt;?php
                  if( have_rows( 'web_design_development', "$loggeduser" ) ):
                      while ( have_rows( 'web_design_development', "$loggeduser" ) ) : the_row(); ?&gt;
                          &lt;tr&gt; 
                              &lt;?php
                              $first = get_sub_field('first'); 
                              $second = get_sub_field('second');                                               
                              ?&gt;
                              &lt;td&gt;&lt;?php echo $first; ?&gt;&lt;/td&gt;
                              &lt;td&gt;&lt;?php echo $second; ?&gt;&lt;/td&gt;            
                          &lt;/tr&gt;
                      &lt;?php endwhile; ?&gt;
                  &lt;?php endif; ?&gt; 
              &lt;/tbody&gt;
          &lt;/table&gt;
      &lt;/div&gt;
  &lt;?php endif; ?&gt;
  </code></pre>