Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- header('Content-type: application/vnd.ms-excel');
- header('Content-Disposition: attachment; filename=g1.xls');
- header("Pragma: no-cache");
- header("Expires: 0");
- $host = '';
- $user = '';
- $pass = '';
- $db = '';
- mysql_connect($host, $user, $pass);
- mysql_select_db($db);
- $query = '';
- echo "id\t";
- echo "dataCreare\t";
- echo "dataValidare\t";
- echo "nrZile\n";
- while($array = mysql_fetch_row(mysql_query($array)))
- {
- echo $array[]."\t".$array[]."\t".$array[]."\t".$array[]."\n";
- }
- // Pentru o linie noua, scrii la sfarsitul unui echo sau print \n
- // Pentru a trece in casuta din dreapta, scrii \t
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement