I am pulling images and information from a mySQL database and displaying with a few PHP functions. At times all of the information isn't there and I need it to basically display:none;
but I can't seem to get it - What am I missing? Here is my display function:
<?php if ($recipe->hassliderimage5 == true) {
$recipe->show_image_carousel5();
} else {
}
?>
And here is the PHP function calling it from the database -
if (trim(mysql_result($this->result,0,"imageCarousel5") != '')) {$this->hassliderimage5 = true;} else {$this->hassliderimage5 = false;}
Here is what I got to work for what I wanted - not sure if it is the best solution or not? I'm still kind of new to PHP.
<?php if ($recipe->hassliderimage5 == true) { ?>
<div id="sliderimageFive" class="item">
<?php
$recipe->show_image_carousel5();
?>
</div>
<?php } ?>