I have a Perl script that, when a button is clicked renders the exact same page in an excel spreadsheet. There is a line of code that I don't understand (I didn't write it), but can't seem to get any straight answers on how to do the same thing in PHP.
The subroutine looks like this:
sub excel {
print $query->header('application/vnd.ms-excel');
print qq[<H3 ALIGN='CENTER'>$title</h3>\n];
print qq[$output<P>];
print qq[<STRONG>Records Found - $recordcount</strong><P>];
print qq[Run Date: $mmm $day, $year<P>];
exit();
}
The line that I don't get is
print $query->header('application/vnd.ms-excel');
How do I replicate that in PHP?
I have the rest done...