How to download/print specific portion of a page using php
<p>I have an HTML page as follows</p>

<pre><code>Lorem Ipsum is simply dummy text of the printing and typesetting industry. 
Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, 
when an unknown printer took a galley of type and scrambled it to make a type specimen book.
&lt;table&gt;
    &lt;th&gt;WEEK&lt;/th&gt;
    &lt;th&gt;DATES&lt;/th&gt;
    &lt;th&gt;Workout #1&lt;/th&gt;
    &lt;th&gt;Workout #2&lt;/th&gt;
    &lt;th&gt;Workout #3&lt;/th&gt;
    &lt;tr&gt;
        &lt;td&gt;1&lt;/td&gt;
        &lt;td&gt;3/27-4/2&lt;/td&gt;
        &lt;td&gt;Warm up for 5 minutes. &lt;/td&gt;
        &lt;td&gt;Same as #1 for this week.&lt;/td&gt;
        &lt;td&gt;Same as #1 for this week.&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td&gt;2&lt;/td&gt;
        &lt;td&gt;4/3-4/9&lt;/td&gt;
        &lt;td&gt;Warm up for 5 minutes. &lt;/td&gt;
        &lt;td&gt;Same as #1 for this week.&lt;/td&gt;
        &lt;td&gt;Same as #1 for this week.&lt;/td&gt;
    &lt;/tr&gt;&lt;/table&gt;
</code></pre>

<p>How can make only the table downloadable and printable using php and/or javascript.</p>
