title: PHP/HTML Export table as pdf?
body: <p>I have a HTML table that displays data from a db using PHP, I'd like to give an option to print the table out (as a button). I thought that exporting as a pdf would be the simplest option to do this. This is how I have the table laid out.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;table id="tfhover" class="tftable" border="1"&gt;
  
    &lt;tr&gt;&lt;th&gt;Refund ID&lt;/th&gt;&lt;th&gt;Customer ID&lt;/th&gt;&lt;th&gt;Manager ID&lt;/th&gt;&lt;th&gt;Customer Name&lt;/th&gt;&lt;th&gt;Amount Refunded&lt;/th&gt;&lt;th&gt;Refund Date/Time&lt;/th&gt;&lt;th&gt;Details&lt;/th&gt;&lt;/tr&gt;
  
    &lt;?php 
       //some php code...
  
       echo '&lt;tr&gt;'; 
       echo '&lt;td&gt;'. $idRefund[$i] .'&lt;/td&gt;'; 
       echo '&lt;td&gt;'. $idCustomer[$i] .'&lt;/td&gt;'; 
       echo '&lt;td&gt;'. $idManager[$i] .'&lt;/td&gt;'; 
       echo '&lt;td&gt;'. $customerName[$i] .'&lt;/td&gt;'; 
       echo '&lt;td&gt;'. $amount[$i] .'&lt;/td&gt;'; 
       echo '&lt;td&gt;'. $dateTime[$i] .'&lt;/td&gt;'; 
       echo '&lt;td&gt;'. $details[$i] .'&lt;/td&gt;'; 
       echo '&lt;/tr&gt;';
       $i++; 
   ?&gt;
  
  &lt;/table&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>How would I go about printing this table using php or javascript or even exporting as a pdf if thats more simplistic.</p>
  
  <p>edit: I ended up using mPDF which is very similar to FPDF in terms of the methods available to use. The help is much appreciated, thanks.</p>