Tentang php : parse error: syntax error, unexpected end of file

Bisa minta bantu, udh (on) short tag di php.ini tetep error.

parse error: syntax error, unexpected end of file

<!-- Page Content  -->
      <div id="content" class="p-4 p-md-5 pt-5">
        <h2 class="mb-4">Monitoring Table</h2>
            <?php
                $sql = 'SELECT Time, Voltage, Current, Power
                        FROM monitoring';

                $query = mysqli_query($connect, $sql);

                if (!$query) {
                    die ('SQL Error: ' . mysqli_error($connect));

                while ($row = mysqli_fetch_row($query))
                {
                echo '<table>
                        <thead>
                            <tr>
                                <th>Time</th>
                                <th>Voltage (V)</th>
                                <th>Current (A)</th>
                                <th>Power (W)</th>
                            </tr>
                        </thead>
                        <tbody>';
                }
                while ($row = mysqli_fetch_row($query))
                {
                    echo '<tr>
                            <td>'.$row[0].'</td>
                            <td>'.$row[1].'</td>
                            <td>'.$row[2].'</td>
                            <td class="right">'.$row[3].'</td>
                        </tr>';
                }
                }
                ?>
        </table>
      </div>
        </div>

  </body>
</html>


avatar Subject
@Subject

1 Kontribusi 1 Poin

Diperbarui 4 tahun yang lalu

1 Jawaban:

Error nya di sebelah mana?

avatar ahanafi
@ahanafi

815 Kontribusi 554 Poin

Dipost 4 tahun yang lalu

Login untuk ikut Jawaban