Location: PHPKode > scripts > PHP DocWriter > php-docwriter/examples/ex6.php
<?php
require_once('../lib/include.php');
import('phpdocwriter.pdw_document');

$sxw = new pdw_document;
$sxw->SetLanguage('es','ES');
$sxw->SetStdFont ("Times New Roman",10);
$sxw->Write ('Insertamos una tabla:');
$sxw->Ln(2);
$header = array('DNI','Nombre','Apellidos','Teléfono','Email');
$data[] = array('23453451F','Pedro','Martín','912345678','hide@address.com');
$data[] = array('36213764H','Juan','Juanitez','915436753','hide@address.com');
$sxw->Table($header,$data);

if (isset ($_REQUEST["format"]) && $_REQUEST["format"]!='') $sxw->SetExportFilter ($_REQUEST["format"]);
if (isset ($_REQUEST["zip"]) && ($_REQUEST["zip"] == 1)) $sxw->CompressOutput();
$sxw->Output();
?>
Return current item: PHP DocWriter