title: Function getImage(); not displaying images on website.
body: <p>Hopefully someone can point me in the right direction. I have a function to call
  and display images from my database, they are not loading for me. </p>
  
  <p>Here is my code below: </p>
  
  <pre><code> &lt;?php
              $itemQuery = "SELECT title, description, price, location FROM item;";
              $returnItemQuery = (mysqli_query($conn, $itemQuery));
  
              if (mysqli_num_rows($returnItemQuery) &gt; 0) {
  
                      function getimage() {
                      include("connection.php");                  
                      $imageQuery = "SELECT image FROM item";
                      $image_info = (mysqli_query($imageQuery));
  
                      while ($image_data = mysqli_fetch_array($image_info)) {
  
                      echo $image_data['image'];  
                      }
                      }
  
                  while ($row = mysqli_fetch_assoc($returnItemQuery)) {
                      $title = $row['title'];
                      $description = $row['description'];
                      $price = $row['price'];
                      $location = $row['location'];
  
  
                      echo "                                     
                      &lt;img src='$image'width='auto' height='auto'&gt;
                      &lt;br&gt; Title: $title&lt;/br&gt;
                      &lt;br&gt; Description : $description&lt;/br&gt;
                      &lt;br&gt; Price: $price&lt;/br&gt;
                      &lt;br&gt; Location: $location&lt;/br&gt;";
                  }
              }
              ?&gt;
  </code></pre>
  
  <p>I have a table called 'item' with image saved as a mediumBlob. Thanks in advance for any help or guidance provided! </p>