title: PHP echo image <div> with php variable
body: <p>I am trying to echo an image within a  tag plus the ID and EXT of the image but it does not seem to work.</p>
  
  <p>This the line of code that produces the error:</p>
  
  <pre><code>echo '&lt;div&gt;&lt;img src="gallery/',$gimage['id'],'.',$gimage['ext']', height="auto" width="auto" border="2"&gt;&lt;/div&gt;';
  </code></pre>
  
  <p>I tried using the exact query without the variable and it turns out to be ok D:</p>
  
  <p>THIS ONE runs perfectly /</p>
  
  <pre><code>  echo '&lt;div&gt;&lt;img src="gallery/13.png" height="auto" width="auto" border="2"&gt;&lt;/div&gt;';
  </code></pre>
  
  <p>EDIT: 
      <strong>The error message '( ! ) Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ',' or ';' in C:\wamp\www\Final Project\view_gallery.php on line 22 '</strong></p>