I'm trying to display a <div> only if the image extra field is being used. if it is not being used, do not show the <div>
The code looks like this right now:
<?php if(isset($extrafields['3']) === true && empty($extrafields['3']) === false): ?>
<div class="interview-image-block">
<?php echo $extrafields[3];?>
<div class="interview-caption">
<?php echo $extrafields[7];?>
</div>
</div>
<?php endif; ?>
The problem is the $extrafields variable is never empty it either displays
<img alt="Interviewer Image" src="/"> -- NO IMAGE
or
<img alt="Interviewer Image" src=".../image.png"> -- With An Image
So our PHP statement does not really do anything since the $extrafield variable is never empty.
How can I get this PHP code to work?
Thanks!