Donate. I desperately need donations to survive due to my health

Get paid by answering surveys Click here

Click here to donate

Remote/Work from Home jobs

Error occured while adding footer and header tag on fpdf

While adding the header function, I get error from the code : Parse error: syntax error, unexpected '->' (T_OBJECT_OPERATOR). All the syntax are in correct order, but still i get errors from the code.

class PDF extends FPDF {
        function Header(){
            this->SetFont('Arial','B',15);
            this->Cell(100,'this is header',0,1);
        }
        function Footer(){
            this->SetFont('Arial','B',15);
            this->Cell(100,'this is footer',0,1);
        }
    }

Comments