title: How can I display pictures from the database into heredoc?
body: <p>I have been trying to display Images into the heredoc it can’t work and I get no errors 
  But if I display  them out if the heredoc they displayed nicely . what might be the problem?
  For any help I will appreciate it .
  Here is the code and I did display the Images twice , in heredoc and out so that u get a clear view .</p>
  
  <pre><code>&lt;?Php
  $target = "image_uploads/";
  $image_name = (isset($_POST['image_name']));
  $query ="select * from
   tish_user inner join tish_images
   on tish_user.user_id = tish_images.user_id
   WHERE tish_images.prof_image = 1";
      $result= $con-&gt;prepare($query);
      $result-&gt;execute();
  
  $table = &lt;&lt;&lt;ENDHTML
  &lt;div style ="text-align:center;"&gt;
  &lt;h2&gt;Client Review Software&lt;/h2&gt;
  &lt;table id ="heredoc" border ="0" cellpaddinig="2" cellspacing="2" style = "width:100%" ;
  margin-left:auto; margin-right: auto;&gt;
  &lt;tr&gt;
  &lt;th&gt;Name&lt;/th&gt;
  &lt;th&gt;Last Name&lt;/th&gt;
  &lt;th&gt;Ref No&lt;/th&gt;
  &lt;th&gt;Cell&lt;/th&gt;
  &lt;th&gt;Picture&lt;/th&gt;
  &lt;/tr&gt;
  ENDHTML;
  
  while($row = $result-&gt;fetch(PDO::FETCH_ASSOC)){
      $date_created = $row['date_created'];
          $user_id = $row['user_id'];
          $username = $row['username'];
  
          $image_id = $row['image_id'];
          #this is the Tannery  operator to replace a pic when an id do not have one
  $photo = ($row['image_name']== null)? "me.png":$row['image_name'];
  #display image 
               # I removed this line up to here 
          echo '&lt;img src="'.$target.$photo.'" width="100" height="100"&gt;';
  
  
  
  $table .=  &lt;&lt;&lt;ENDINFO
  &lt;tr&gt;
  &lt;td&gt;&lt;a href ="client_details.php?user_id=$user_id"&gt;$username &lt;/a&gt;&lt;/td&gt;
  &lt;td&gt;$image_id&lt;/td&gt;
  &lt;td&gt;&lt;/td&gt;
  &lt;td&gt;c&lt;/td&gt;
  &lt;td&gt;&lt;img src="'.$target.$photo.'" width="100" height="100"&gt;
  &lt;/td&gt;
  &lt;/tr&gt;
  ENDINFO;
  }
      $table .= &lt;&lt;&lt;ENDHTML
  &lt;/table&gt;
  &lt;p&gt;$numrows"Clients&lt;/p&gt;
  &lt;/div&gt;
  ENDHTML;
  echo $table;
  ?&gt;
  </code></pre>