I'm trying to fetch data from more then two tables but I'm facing syntax errors of (T_ENCAPSED_AND_WHITESPACE). I don't know why it throws these errors. Is my method incorrect or have I made any syntax errors? Please help me to figure out this stuff.
<?php
$sql = "SELECT e.Exam_Name,e.Start_date,c.Standard,c.division,c.RollNo,r.Subject_Name,r.Marks,r.OutOFF 
     FROM e exam, c class, r result
     where c.Class_ID = e.Class_ID
     AND c.Student_ID = r.Student_ID;
        if($result = mysqli_query($con,$sql))
          {
            while($row1 = mysqli_fetch_array($result))
            {   
        ?>
        <html>
        <head></head>
        <body>
        <table>
        <tr>
            <td><?php echo $row1['Exam_Name'];?></td>
            <td><?php echo $row1['Start_date'];?></td>
            <td><?php echo $row1['Standard'];?></td>
            <td><?php echo $row1['division'];?></td>
            <td><?php echo $row1['RollNo'];?></td>
            <td><?php echo $row1['Subject_Name'];?></td>
            <td><?php echo $row1['Marks'];?></td>
            <td><?php echo $row1['OutOFF'];?></td>
        </tr>   
        </table>    
            </body>             
            </html>
            <?php
            }
          }
?>
 
     
    