'How to view images from database on to the website document?

I'm trying to show pictures stored in a database but when I run the code, a brunch of text of the picture comes up. (shown in the image below) enter image description here

here's my code for displaying the contents of the database

<?php
include ("connectdb.php");
try {
  $rows = $db -> query("SELECT animal_id, title, animal_dob, animal_type, animal_description,picture_of_animal FROM animals");
    ?> <table>
  <tr>
   <th> Animal id <th> Title </th> <th> Date of birth </th> <th> Type </th><th>Description</th><th>Picture</th>
 </tr> <?php
  foreach ($rows as $rows => $r) {
    ?>
<tr>
 <td><?php echo $r['animal_id']; ?></td>
  <td><?php echo $r['title']; ?> </td>
  <td><?php echo $r['animal_dob']; ?> </td>
  <td><?php echo $r['animal_description']; ?> </td>
  <td><img src "<?php echo $r['picture_of_animal']; ?>" </td>
</tr>
<?php
}
?>

</table>;
<?php
}catch (PDOException $ex) {
  ?>
  <p>Sorry, a database error occurred.</p>
  <p> Error details: <em> <?= $ex->getMessage() ?> </em></p>
<?php
}
?>

Heres a picture of my datatable enter image description here



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source