What are common reasons for a "Parse error: syntax error, unexpected" message in PHP?

A common reason for a "Parse error: syntax error, unexpected" message in PHP is due to a typo, missing semicolon, or incorrectly placed parentheses in the code. To solve this issue, carefully review the code for any syntax errors and make necessary corrections.

// Incorrect code with syntax error
$variable = 5
if ($variable > 0) {
    echo "Variable is positive";
}

// Corrected code
$variable = 5;
if ($variable > 0) {
    echo "Variable is positive";
}