3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<html code ------------------> <?php if (isset($_POST["submit"]) ){ header("Content-Disposition: attachment; filename=\"Report.xls\""); header("Content-Type: application/vnd.ms-excel;"); header("Pragma: no-cache"); header("Expires: 0"); $out = fopen("php://output", "w"); foreach ($tabledata as $data) { //print_r($data); fputcsv($out, $data,"\t"); } fclose($out); } ?> <form name="form_name" method="post" action=""><input type="submit" value="Download Excel" name ="submit" /></form
Output for 4.3.0 - 7.2.0
<html code ------------------> <form name="form_name" method="post" action=""><input type="submit" value="Download Excel" name ="submit" /></form