How can syntax errors, like unexpected T_INCLUDE, be avoided when using include() in PHP?

To avoid syntax errors like unexpected T_INCLUDE when using include() in PHP, ensure that the path to the included file is correct and that the file exists. Additionally, make sure to use double quotes around the file path to prevent issues with special characters or variables in the path.

// Correct way to include a file in PHP
include("path/to/file.php");