What common syntax errors can occur in PHP code, and how can they be avoided?

One common syntax error in PHP code is missing semicolons at the end of statements. To avoid this error, always remember to terminate each statement with a semicolon. Example:

// Incorrect code with missing semicolon
$name = "John"
echo "Hello, $name";
```

To fix the syntax error, add a semicolon at the end of the `$name` assignment statement:
```php
// Corrected code with semicolon
$name = "John";
echo "Hello, $name";