PHP使用xampp解析错误:语法错误,意外'$ query'(T_VARIABLE)[重复]

This question already has an answer here:

For some reason it is giving me this error Parse error: syntax error, unexpected '$query' (T_VARIABLE)
code:

$query="SELECT * FROM posts, users 
WHERE posts.userID = users.userID ORDER BY postTimestamp";          
$result = mysqli_query($connection $query); 
</div>

You forget to use the ',' in $result

$result = mysqli_query($connection, $query);

The reason is comma that you have forgotten:

$query="SELECT * FROM posts, users 
WHERE posts.userID = users.userID ORDER BY postTimestamp";          
$result = mysqli_query($connection, $query);