I am inserting values to an sql table and displaying it through AJAX. The values get displayed properly but the image does not come in the right column, instead it comes on top. Why does this happen?
Although the image is shown in the webpage, it is however aligned in different position.
<?php
...
...
...
$result = mysqli_query($connect, $query);
if(mysqli_num_rows($result) > 0)
{
$output .= '
<div class="table-responsive">
<table class="table table bordered">
<tr>
<th>ID</th>
<th>Name</th>
<th>Time</th>
<th>Img</th>
</tr>
';
while($row = mysqli_fetch_array($result))
{
$output .= '
<tr>
<td>'.$row["ID"].'</td>
<td>'.$row["Name"].'</td>
<td>'.$row["Time"].'</td>
<td>' ?> <img src="<?php echo $row['Img']; ?>" alt="my picture" height="100" width="100" /> <?php '</td> //Here is the problem where I am trying to display the image
</tr>
';
}
echo $output;
}
else
{
echo 'Data Not Found';
}
?>