What are common syntax errors to watch out for when concatenating strings in PHP?

Common syntax errors to watch out for when concatenating strings in PHP include forgetting to use the concatenation operator (.), using the wrong quotes (single vs double), and missing semicolons at the end of statements. To avoid these errors, always use the dot (.) to concatenate strings, ensure consistent use of quotes, and end each statement with a semicolon.

// Incorrect way to concatenate strings
$name = "John"
$message = 'Hello, ' $name '!'; // missing concatenation operator and semicolon

// Correct way to concatenate strings
$name = "John";
$message = 'Hello, ' . $name . '!'; // using concatenation operator and semicolon