What are common syntax errors encountered in PHP code?

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

// Incorrect code
echo "Hello, world"
echo "This is a syntax error"

// Corrected code
echo "Hello, world";
echo "This is a syntax error";
```

Another common syntax error is forgetting to close parentheses or brackets in function calls or control structures. This can cause syntax errors or unexpected behavior in the code. To fix this issue, ensure that all parentheses and brackets are properly closed in your PHP code.

```php
// Incorrect code
if ($x > 5 {
    echo "x is greater than 5";
}

// Corrected code
if ($x > 5) {
    echo "x is greater than 5";
}