title: Echoing through PHP an HTML image path which is dynamic
body: <p>I am trying to echo a dynamic image path in PHP. I have this code that works</p>
  
  <pre><code> &lt;?php
   //this code works
   $image = '&lt;img src="img/newlogo.jpg"&gt;';
   echo($image);
  ?&gt;
  //gives me an image
  </code></pre>
  
  <p>And this code that doesn't</p>
  
  <pre><code> &lt;?php
   //this code doesn't
   $lineofstring='newlogo.jpg';
  
   $image = '&lt;img src="img/$lineofstring"&gt;';
   echo($image);
  ?&gt;
  </code></pre>
  
  <p>$lineofsting is actually going to be an image path which is stored in a mysql database where one row is filled with, for example: pictureabc.jpg, second row is picturexyz.jpg etc.</p>
  
  <p>I am trying to pass on the searched imagepath name onto $lineofstring, which is then echo'd but no picture comes out. Where am i going wrong?</p>