What is the common syntax error in PHP code that leads to unexpected T_STRING error?

The common syntax error in PHP code that leads to an unexpected T_STRING error is when a string is not properly enclosed within quotes. This can happen when concatenating strings or when using a variable within a string without proper concatenation. To solve this issue, always make sure to enclose strings within single or double quotes as needed to avoid the T_STRING error.

// Incorrect code causing T_STRING error
$variable = "Hello";
echo $variable World!";

// Corrected code
$variable = "Hello";
echo $variable . " World!";