What is the correct syntax for if-else statements in PHP when generating email content?

When generating email content in PHP, you may need to include conditional statements to customize the content based on certain conditions. To do this, you can use if-else statements to check for specific conditions and generate different content accordingly. The correct syntax for if-else statements in PHP involves using the keywords "if", "else if" (optional), and "else" followed by the condition in parentheses and the code block to execute if the condition is true.

<?php
// Example of if-else statement in PHP for generating email content
$emailContent = '';

if ($condition1) {
    $emailContent = 'Content for condition 1';
} else if ($condition2) {
    $emailContent = 'Content for condition 2';
} else {
    $emailContent = 'Default content if conditions are not met';
}

echo $emailContent;
?>