Hide a div if php echo content is empty
<div class="botontour"><a href="<?php echo $currentItem['video'];?
>">Video Tour 3D</a></div>
I want to hide the entire "botontour" div if the php echo has no return.
Solution 1:
in this case you can check if it's empty :
<?php
if (!empty($currentItem['video'])) {
?>
<div class="botontour"><a href="<?= $currentItem['video'];?>">Video Tour 3D</a></div>
<?php
}
?>