What is the correct syntax for an if statement in PHP, based on the example provided in the thread?

The issue in the thread is that the if statement syntax is incorrect in PHP. To correct this, the if statement should be enclosed in parentheses. The correct syntax for an if statement in PHP is: if (condition) { // code block }.

if ($age < 18) {
    echo "You are a minor.";
} else {
    echo "You are an adult.";
}