What are common syntax errors in PHP code that can lead to parse errors like "unexpected ')' on line 2"?

Common syntax errors in PHP code that can lead to parse errors like "unexpected ')' on line 2" are usually caused by missing or misplaced parentheses in function calls or conditionals. To solve this issue, carefully check the syntax of your code and ensure that all opening parentheses have matching closing parentheses. Additionally, pay attention to the order of parentheses in your code to avoid unexpected errors. Example PHP code snippet:

// Incorrect code with missing parentheses causing parse error
if (condition {
    echo "Condition is true";
}

// Corrected code with proper parentheses
if (condition) {
    echo "Condition is true";
}