CONVERT PHP ARRAY INTO EXCEL FILE
<?php
header("Content-Type: application/vnd.ms-excel");
header("Content-disposition: attachment; filename=spreadsheet.xls");
$exhibition = array(
array('id' => '1','name' => 'Mr N .Vishwanath','jobTitle' => 'Director','company' => 'SLV
RUBBERPRODUCTS','address' => 'Shed No 7,7th Main ,Doddanna Indl Area')
);
echo "<table border='1'>";
foreach($exhibition as $data ){
echo "<tr>";
foreach($data as $key=>$val ){
echo "<td>";
echo $val ;
echo "</td>";
}
echo "</tr>";
}
echo '</table>';
echo $i;
?>
Comments
Post a Comment