1

I am receiving this error on my php code: Unexpected 'EndOfFile'.intelephense(1001)

<html>
<head>
<title>PHP Multiple Choice Questions and Answers - www.pakainfo.com</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css">
</head>
<body>
<?php
    include 'questionclass.php';
    $db = new Question();
    $quesions = $db->get_questions();

?>
<div class="container">
<h1>Multiple Choice Questions Answers</h1>
<p>Please fill the details and solutions the all questions-</p>
<div class="form-group">
<form action="score.php" method="post">
<?php
foreach($quesions as $ques) {
$options = $db->question_options($ques[0]);

?>
<h4><?php echo $ques[1]; ?></h4>
<div class="input-group-text" style="text-align: left; font-size: 18px;"> 
<ol>
<?php
foreach($options as $option) { 
 echo "<li><input type='radio' name='".$option[2]."' value='".$option[1]."' required/> ".$option[3]."</li>";
}
?>
</ol>
</div>

</div>
<div class="form-group">
<input type="submit" value="Submit" name="submit" class="btn btn-primary"/>
</div>
</form>
</div>
</body>
</html>

Any ideas as to why this may be would be greatly appreciated, I am very much new to php

Rory
  • 11
  • 1
  • 2
    In your case, you missed a closing bracket of your foreach loop `foreach($quesions as $ques) {` You probably have to close it after your `` – Andreas Mar 21 '22 at 23:31

0 Answers0