codeigniter - Parsing Variable into TCPDF -


my problem : undefined variable test. code :

<?php  require_once('tcpdf/tcpdf.php');  extract ($datapr);  $test = $datapr ['ref_no']; //print_r $test = 'pr/1.2.3.4/ok'  class mypdf extends tcpdf {     public function footer() {       $test;    }  }  ?> 

problem undefined variable $test inside function footer. can me out?

try in side function

<?php  require_once('tcpdf/tcpdf.php');  class mypdf extends tcpdf {     // or  rename footer index();    public function footer() {        extract($datapr);        // print_r $test = 'pr/1.2.3.4/ok'        $test = $datapr['ref_no'];        echo $test;    }  } 

if controller first letter of class name should upper case my_pdf.php , class my_pdf extends tcpdf {}


Comments

Popular posts from this blog

SVG stroke-linecap doesn't work for circles in Firefox? -

routes - Laravel 4 Wildcard Routing to Different Controllers -

cross browser - XSLT namespace-alias Not Working in Firefox or Chrome -