I am using html2pdf to generate a pdf.i need to generate some rows dynamically. My code is..
<?php
require_once("html2pdf.class.php");
$content = '<html><body><table border="0" >
<tr><td align="center" > <h4><b> CHAMPIONSHIP
2015-16</b> </h4></td> </tr>
<tr><td align="center"><h4><b>
</b></h4></td></tr>
<tr><td align="center"><h4><b>DETAILED ENTRY</b>
</h4> </td></tr>
<tr><td><h4><b>Name of Manager :</tr>
</table>
$html2pdf = new HTML2PDF
('L','A4','de',true,'UTF-8',array(10, 10, 10, 10));
$html2pdf->WriteHTML($content);
$html2pdf->Output($filename.'.pdf');
How i can add php inside this content.If it doesn't work anyway pls suggest something else to generate the pdf..Thank you
Can't you do this like basic PHP ?
$your_var = 'what you want';
$content = '<html><body><table border="0">';
$content .= '<html code...>'.$your_var.'</...html code>';
$content .= '</table></body><html>';
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With