title: PHP - If variable is not empty, echo some html code
body: <p>I would like to display some html code if a variable is not empty, else I would like to display nothing.</p>
  
  <p>I've tried this code but doesn't work:</p>
  
  <pre><code>&lt;?php 
      $web = the_field('website');
      if (isset($web)) {
  ?&gt;
         &lt;span class="field-label"&gt;Website: &lt;/span&gt;&lt;a href="http://&lt;?php the_field('website'); ?&gt;" target="_blank"&gt;&lt;?php the_field('website'); ?&gt;&lt;/a&gt; 
  &lt;?php
      } else { 
          echo "Niente";
      }
  ?&gt;
  </code></pre>