Sto creando il pdf del mio report.
Nell'intestazione deve avere una tabella con 1 riga e 3 colonne in cui vanno le variabili $SupSx, $SupCe, $SupDx.
Codice PHP:
<?php
session_start();
$SupSx=$_SESSION['SupSx'];
$SupCe=$_SESSION['SupCe'];;
$SupDx=$_SESSION['SupDx'];
require_once('tcpdf_include.php');
// Extend the TCPDF class to create custom Header and Footer
class MYPDF extends TCPDF {
public function Header(){
$html = '<table cellspacing="0" cellpadding="1" border="1"><tr><td rowspan="3"><?php echo "$SupSx"; ?></td><td>'.$SupCe.'</td><td>$SupDx</td></tr></table>';
$this->writeHTMLCell($w = 0, $h = 0, $x = '', $y = '', $html, $border = 0, $ln = 1, $fill = 0, $reseth = true, $align = 'top', $autopadding = true);
}
// Page footer
public function Footer() {
// Position at 15 mm from bottom
$this->SetY(-15);
// Set font
$this->SetFont('helvetica', 'I', 8);
// Page number
$this->Cell(0, 10, 'Page '.$this->getAliasNumPage().'/'.$this->getAliasNbPages(), 0, false, 'C', 0, '', 0, false, 'T', 'M');
}
}
Con il codice inserito ottengo la tabella nell'intestazione, ma le varibili non mi vengono convertite in nessun modo. Come posso ovviare al problema?