generate dynamic rows in pdf using html2pdf

Viewed 1037

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

3 Answers
Related