Common errors
Syntax errors
- Misspelling keywords.
- Forgetting an opening or closing parenthesis, bracket, brace, or comment character.
- Forgetting to end a PHP statement with a semicolon.
- Forgetting an opening or closing quotation mark.
- Not using the same opening and closing quotation mark.
Problems with variable names
- Misspelling or incorrectly capitalizing a variable name.
- Using a keyword as a variable name.
Problems with values
- Not checking that a value is the right data type before processing it.
- Using one equals sign instead of two when testing for equality.
Back