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”

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

Source: syntax

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.