i want to fetch data from database and insert it in my html table here is my code i dont know where is my misatake:

```
    <div class="ibox-content">
    <?php
    $servername = "localhost";
    $username = "sehnoqta_userbmc";
    $password = "u?gQ=uS%t;a?";
    $dbname = "sehnoqta_bmc";
    $conn = new mysqli($servername, $username, $password, $dbname);
    // Check connection
    if ($conn->connect_error) {
         die("Connection failed: " . $conn->connect_error);
    } 
    $sql = "SELECT name, lastname, phone FROM regis";
    $result = $conn->query($sql);
    $conn->close();
    ?>
            <table dir="rtl" class="table table-striped table-bordered table-hover dataTables-example" >
            <thead>
            <tr>
                <th>Name</th>
                <th>Last Name</th>
                <th>Phone</th>
                <th>Email</th>
                <th>Acc Type</th>
            </tr>
            </thead>
            <tbody>
            <?php
            if ($result->num_rows > 0) {

         while($row = $result->fetch_assoc()) {
             echo
              "<tr><td>" . $row["name"]. "</td>
              <td>" . $row["lastname"]. "</td>
              <td>" . $row["phone"]. "</td></tr>";
              <td>0795934799</td>
              <td class="center">demo@demo.com</td>
              <td>Admin</td>
         }
         echo "</table>";
    } 
        ?>
            </tbody>
            </table>
            </div>

```

data i fetch from database shows out of table. 
sorry for bad English :)