How do I hide several lines if php variable is empty?
问题 As a learner in PHP, I'm struggling to hide from displaying several lines, if a chosen variable is empty. I can get this to work on a basic level, but am lost when the content to be hidden gets more complicated. The concept I am aiming at is this: <?php if (isset($g1)) { ?> ((This part should not display if variable $g1 is empty)) <?php } ?> My code looks like this: <?php if (isset($g1)) { ?> <a href="img/g1.png" class="lightbox" rel="tooltip" data-original-title="<?php print $g1; ?>" data