There's a good chance that my title didn't make sense and that's partially why I'm posting in the first place, cause I'm not exactly sure how to search for the solution to my problem and subsequently unsure of how to ask about a solution.
Basically, I have a series of albums. Some have very lengthy descriptions. I have a div block that contains my description, which I'd like only to appear if a description exists. As it is, the div block shows up on all album pages, most with empty descriptions.
So I guess my question is, how would I go about telling the album.php page to only print the div if the album description exists?
Comments
Parse error: syntax error, unexpected T_STRING, expecting T_VARIABLE or '$'
Basically, I want this set of code:
`
Album Explanation
<?php printAlbumDesc(true); ?>
to execute only if a description exists. Would the code you gave me pull that off?
$desc = getAlbumDesc();
if (!empty($desc)) {
?>
Album Explanation
<?php printAlbumDesc(true); ?>
<?php } ?>`