how to use file_get_content with php include
===

I am having problems with converting html into pdf I am using TCPDF for it, I am trying to get the following. and its not working :(

    $html = htmlspecialchars_decode(file_get_contents('main.php')); 


    $html = htmlspecialchars_decode(file_get_contents('main.php')); 

    html = file_get_contents('main.php');

my main.php contains the following code. 

    <?php
    include_once 'design/header.php';
    include_once 'mainpage.php';
    include_once 'design/sidemenu.php';
    include_once 'design/footer.php';
    ?>


Can someone help me with this ? 


Basically I have a table in HTML generated generated using php loop and getting information from the database, users can make chnages to the table values and once finalized they can click submit and it should generate a pdf file. 

can someone help me with this ?

