So this is the php file that i need to work but cant figure out what is wrong wiv it
<!doctype html>abc</hea…
<?php for ($i = 1; $i <= 50; $i++) { // Repeat the process 50 times $sequence = ""; // Initialise variable to hold the sequence for ($x = 1; $x <= 3; $x++) { $randnum = rand(1,3); // Assign a random number to $randnum if ($randnum == 1) { // Find the value of $randnum $letter = "A"; } elseif ($randnum == 2) { $letter = "B"; } elseif ($randnum == 3) { $letter = "C"; } else { echo "Random number was not between 1 and 3."; } $sequence = $sequence . $letter; // Concatenate the letter on to the sequence of letters } echo $sequence . ""; // Output the sequence and take a new line if ($sequence == "ABC") { // Check if the sequence is ABC and if so increment the counter by 1 $ctr++; echo "Sequence found! Total count: " . $ctr . "
"; } ?>
this is the html file that is attached to it
GuessEnter Your Guess
grade:
grade:
but i keep getting an error message saying:
Parse error: syntax error, unexpected $end in C:\xampp\htdocs\abc.php on line 31
i am running the files through xampp on windows 7