Problem in FPDF header with a php variable

GiovanniAdamo

New Member
I have a php file that I use to print pdf (using FPDF). In this file I have a variable $date and I would like to show this variable $date in the header on each of the pages of my pdf document.That is my variable $date:\[code\]$convert_date=strtotime($selected_date);global $date;$date=date("d/m/Y",$convert_date);\[/code\]And this is the class FPDF:\[code\]class PDF extends FPDF{ function setDate($dat){ $this->header_date = $dat; } function getDate(){ return $this->header_date; } function Header(){ $this->SetFont('Arial','B',16); $this->setDate($date); $this->Write (10, ' Date: '); //1
 
Back
Top