What are some common syntax errors that could cause unexpected behavior in PHP scripts?

One common syntax error in PHP scripts is missing semicolons at the end of statements, which can lead to unexpected behavior or errors. To fix this issue, make sure to add semicolons at the end of each statement in your PHP code.

// Incorrect code with missing semicolons
$name = "John"
echo "Hello, " . $name

// Corrected code with semicolons added
$name = "John";
echo "Hello, " . $name;