How can you do the following:
$first_name = 'John';
$last_name = 'Doe';
$message = "
Dear $first_name if (isset ($last_name)) {$last_name},
Thank you for your interest...
";
I realize the above code does not work but how would one put conditional logic within a variable.
I need to gather form data to put into the body of an email but some of the form data is not required.