How to fix this syntax error in php? [duplicate]

This question already has an answer here:

I am trying to create a php file that displays the average score out of 5 numbers for class, but when i ever I try to display it i keep getting this error

“Parse error: syntax error, unexpected ‘print’ (T_PRINT) in C:xampphtdocsscores.php on line 10”

<html>
<head>
<title> average scores </title>
</head>
<body>
<?php
$scorefile = fopen("scores.txt,"r")
$avgscore = (score1 +score2 + score3 + score4 + score5)/5);
fclose($scorefile);
print(<p> average score is $avgscore</p>);
?>
</body>
</html>


Source: syntax

Leave a Reply