In this tutorial, we’re going to provide details regarding the error message syntax error, unexpected T_STRING, including the meaning and ways to fix it.

What Does the Error Mean?

The error message Parse error: syntax error, unexpected T_STRING usually appears when a .html file starts with an <? tag. This confuses our Apache web server when attempting to execute the code as it is a PHP script.