What are common syntax errors to look out for when writing PHP code, as seen in the forum thread example?

Common syntax errors to look out for when writing PHP code include missing semicolons at the end of lines, mismatched parentheses or curly braces, and using single quotes instead of double quotes for strings that contain variables. To solve these issues, carefully review your code for any missing or misplaced characters, and make sure to use the correct quotation marks for strings. Example code snippet:

// Incorrect code with missing semicolon and mismatched curly braces
$name = "John"
if ($name == "John") {
  echo "Hello, $name!";
}

// Corrected code with added semicolon and fixed curly braces
$name = "John";
if ($name == "John") {
  echo "Hello, $name!";
}