title: Show base64 image using <img> tag in TCPDF?
body: <p>I want to show Base64 image in <code>&lt;img&gt;</code> tag. I have Base64 images in JSON array. I used Foreach to display image in my TCPDF table. but it shows nothing.
  <strong>JSON array example =></strong> <code>[{'SNO':0,'IMG': &lt;encodeded-base64-code&gt;}]</code>  </p>
  
  <p>I get image code from PHP, encode it into Base64 and used Foreach to display image in my TCPDF. but it shows nothing.</p>
  
  <pre><code>while($row = oci_fetch_assoc($prs))
  {
      $result1['SNO'] = $row['SNO'];
      if (is_object($row['IMG'])) 
      {                   
         $img=$row["IMG"]-&gt;load();
         $row["IMG"]-&gt;free();
         $result1['IMG'] = base64_encode($img);
      }
      array_push($result, $result1);
      $res = json_encode($result);
  }
      $dt = array();
      $dt = json_decode($res);
      $tbl = '&lt;table&gt;&lt;tr&gt;
      &lt;th&gt;Sno&lt;/th&gt;
      &lt;th&gt;Image&lt;/th&gt;&lt;/tr&gt;';
      foreach($dt as $key =&gt; $lbl)    
      {
         $tbl .= '&lt;tr&gt;&lt;td&gt;'.$lbl-&gt;SNO.'&lt;/td&gt;';
         $tbl .= '&lt;td&gt;&lt;img src="data:image/jpeg;base64,'.$lbl-&gt; IMG.'"&gt;&lt;/td&gt;&lt;/tr&gt;';
      }
      $tbl .= '&lt;/table&gt;';
      $pdf-&gt;writeHTML($tbl, true, false, false, false, '');
      $pdf-&gt;Output('create.pdf', 'I');
  </code></pre>
  
  <p>Display Base64 image in html table in loop.</p>