title: TCPDF - printing table from mysql showing repeated first row
body: <p>I am new to TCPDF. The small problem that I am facing is that all output data is displaying the same row. I mean the first record is repeated the number of times the total data(rows) exist in the database. Here is my code</p>
  
  <pre><code>$tbl_header = '&lt;style&gt;
  table {
      border-collapse: collapse;
      border-spacing: 0;
      margin: 0 20px;
  }
  tr {
      padding: 3px 0;
  }
  
  th {
      background-color: #CCCCCC;
      border: 1px solid #DDDDDD;
      color: #333333;
      font-family: trebuchet MS;
      font-size: 30px;
      padding-bottom: 4px;
      padding-left: 6px;
      padding-top: 5px;
      text-align: left;
  }
  td {
      border: 1px solid #CCCCCC;
      font-size: 25px;
      padding: 3px 7px 2px;
  }
  &lt;/style&gt;
  &lt;table id="gallerytab" width="600" cellspacing="2" cellpadding="1" border="0"&gt;
  &lt;tr&gt;
          &lt;th&gt;&lt;font face="Arial, Helvetica, sans-serif"&gt;Products Title&lt;/font&gt;&lt;/th&gt;
          &lt;th&gt;&lt;font face="Arial, Helvetica, sans-serif"&gt;Product Specs&lt;/font&gt;&lt;/th&gt;
          &lt;th&gt;&lt;font face="Arial, Helvetica, sans-serif"&gt;Product Price&lt;/font&gt;&lt;/th&gt;
          &lt;th&gt;&lt;font face="Arial, Helvetica, sans-serif"&gt;Products Image&lt;/font&gt;&lt;/th&gt;
        &lt;/tr&gt;';
  $tbl_footer = '&lt;/table&gt;';
  $tbl = '';
  
  while ($row_Pro_Record = mysql_fetch_assoc($Pro_Record)) {
  $tbl .= '
      &lt;tr&gt;
          &lt;td&gt;'.$p_title.'&lt;/td&gt;
          &lt;td&gt;'.$p_size.'&lt;/td&gt;
          &lt;td&gt;'.$p_price.'&lt;/td&gt;
          &lt;td&gt;&lt;img width="120"src="http://localhost/product/images/'.$c_name.'/'.$p_image.'.jpg"&gt;&lt;/td&gt;
      &lt;/tr&gt;
  ';
  }
  // output the HTML content
  $pdf-&gt;writeHTML($tbl_header . $tbl . $tbl_footer, true, false, false, false, '');
  </code></pre>
  
  <p>It could be a small stupid detail that I am missing as my php/mysql skills aren't that great. Any help would be much appreciated, thanks in advance :)</p>