title: using <? echo$item->getImage().'-1.jpg'?> to get an image name from a database
body: <p>in my code i used</p>
  <pre><code>&lt;img class='container  card-body furniture-size' src=&quot;../FurnitureImages/&lt;? echo$item-&gt;getImage().'-1.jpg'?&gt;&quot;
  </code></pre>
  <p>but when i test it the image name is</p>
  <pre><code>&lt;?%20echo%20$item-&gt;getImage().%27-1.jpg%27%20?&gt; 
  </code></pre>
  <p>instead of</p>
  <pre><code>&quot;furniture1-1.jpg&quot;
  </code></pre>
  <p>the section with the code is:</p>
  <pre><code>    &lt;div class=&quot;center-align  main-side furniture-box &quot; style=&quot;float: right&quot;&gt;
         &lt;h1 class=&quot;w-100 p-5 pulse text-white&quot; &gt;Furniture&lt;/h1&gt;
          &lt;div class=&quot;col-sm-12 row&quot; style=&quot;margin-left: 175px&quot;&gt;
              &lt;?php foreach ($view-&gt;searchResult as $item) { ?&gt;
                  &lt;div class='furniture-box border-white  col-sm-4 pt-2 pb-3 m-1' style='float: right; color:#fff; background:#9fa9a3'&gt;
                      &lt;?php echo $item-&gt;getFurnitureName()?&gt;
  
                      &lt;img class=&quot;container  card-body furniture-size'&quot; src=&quot;../FurnitureImages/&lt;?php echo $item-&gt;getImage() . '-1.jpg'; ?&gt;&quot;/&gt;
  
                      Color: &lt;?php echo $item-&gt;getFurnitureColour()?&gt;
                      &lt;br&gt;
                      &lt;a href=&quot;/viewItem.php?itemId=&lt;?php echo $item-&gt;getFurnitureId()?&gt;&quot; class=&quot;btn btn-dark&quot;&gt;View to Bid&lt;/a&gt;
                  &lt;/div&gt;
              &lt;?php }?&gt;
          &lt;/div&gt;
         
       &lt;/div&gt;
  </code></pre>
  <p>can anyone help me fix this please?</p>