This is the php code I wrote for our product view page. It should only show on the front end if the variable has a value. yet the html still shows even if the product does not have the variable defined. Note: This is specific to the magento predefined country of manufacture attribute.
<?php
$coManufacturer = $this->getProduct()->getAttributeText('country_of_manufacture');
?>
<?php if ($coManufacturer): ?>
<p><strong>Country of Origin:</strong> <?php echo $coManufacturer; ?></p>
<?php endif; ?>
Best Answer
Looks like the solution was to dump the var to understand what was being populated for the empty field of the attribute. Once I got that figured out, I was able to change the condition to this:
($coManufacturer!=" ")
which corrected the behavior. Thanks for your guys help!