What potential syntax errors should be avoided when assigning values to variables in PHP?

One potential syntax error to avoid when assigning values to variables in PHP is using invalid characters in variable names. Variable names in PHP must start with a dollar sign ($) followed by a letter or underscore, and can only contain letters, numbers, and underscores. Another common mistake is forgetting to use the assignment operator (=) when assigning a value to a variable.

// Incorrect variable name with invalid character
$my-variable = "Hello World";

// Correct variable assignment
$my_variable = "Hello World";