title: Wordpress data from database won't display in template
body: <p>I have a shrotcode and I want to display in the shortcode some data from database and I still get this(the sintax of php):<a href="https://i.stack.imgur.com/9BuEP.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/9BuEP.png" alt="enter image description here"></a></p>
  
  <p>Here is my code for the template :</p>
  
  <pre><code>    &lt;?php global $wpdb;
      $table_name = $wpdb-&gt;prefix . 'property';
      $properties = $wpdb-&gt;get_results("SELECT * FROM $table_name");
  
      ?&gt;
  
  &lt;?php foreach ($properties as $property) : ?&gt;
  
      &lt;div class="col-sm-4 my-4 card-selector"&gt;
          &lt;div class="card bg-light text-dark card-height"&gt;
              &lt;?php if ($property-&gt;sale_rent == 0) : ?&gt;
                  &lt;div class="corner-ribbon top-left sticky red shadow"&gt;Sale&lt;/div&gt;
              &lt;?php elseif ($property-&gt;sale_rent == 1): ?&gt;
                  &lt;div class="corner-ribbon top-left sticky red shadow"&gt;Rent&lt;/div&gt;
              &lt;?php endif; ?&gt;
              &lt;img class="img-responsive card-img-top" src="" alt=""&gt;
              &lt;div class="card-body"&gt;
                  &lt;h2 class="card-title"&gt;&lt;?php echo $property-&gt;country ?&gt;&lt;/h2&gt;
                  &lt;h3 class="card-title"&gt;&lt;?php echo $property-&gt;price ?&gt; £&lt;/h3&gt;
                  &lt;h5 class="card-title"&gt;&lt;?php echo $property-&gt;county, $property-&gt;town ?&gt;&lt;/h5&gt;
                  &lt;h6 class="card-title"&gt;&lt;?php echo $property-&gt;displayable_address ?&gt;&lt;/h6&gt;
                  &lt;i class="fas fa-bed"&gt;&lt;?php echo $property-&gt;nr_of_bedrooms ?&gt;&lt;/i&gt; &lt;i
                          class="fas fa-bath"&gt;&lt;?php echo $property-&gt;nr_of_bathrooms ?&gt;&lt;/i&gt;
                  &lt;p id="description" class="description card-text"&gt;&lt;?php echo $property-&gt;property_description ?&gt;&lt;/p&gt;
                  {% if property.custom %}
                  &lt;?php if ($property-&gt;custom) : ?&gt;
                      &lt;a href="" class="card-link"&gt;Edit&lt;/a&gt;
                      &lt;a class="deleterow card-link"
                         href=""&gt;Delete&lt;/a&gt;
                  &lt;?php endif; ?&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;?php endforeach; ?&gt;
  </code></pre>
  
  <p>Here i get the shortcode :</p>
  
  <pre><code>  &lt;?php
  
  function r_view_property_form_shortcode()
  {
  
      $formHTML = file_get_contents('view-property-template.php', true);
  
      return $formHTML;
  }
  </code></pre>