I’m looking to add an if statement to display a title if something is in a variable but not 100% sure how to go about it.
My current coding shows:
<?php echo $quote->getmessage(); ?>
But I would like it to show a title and the content of the message if there is content in the variable. If there is nothing within the variable I don’t want to show anything.
IMHO it’s better to be as verbose as necessary so that the code is easily readable and can be extended without totally rewriting it: