php - Error when using dompdf library withh codeigniter -
i tried export pdf file using dompdf library, when call generatetitplepage() method got error : undefined variable number mycode:
public function generatetitlepage() { $uid = (int) $this->uri->segment(3, 0); $this->load->database(); $query = $this->db->query("select * dosars id_dosar = $uid"); if ($query->num_rows() > 0) { foreach ($query->result() $row) { $number = $row['number']; $name = $row['name']; $surname = $row['surname']; $village = $row['village']; } } $html = $number; $this->load->library('dompdf_gen'); $this->dompdf->load_html($html); $this->dompdf->render(); $this->dompdf->stream("welcome.pdf"); }
help me please guys!!!!!!!!!!!!!!!exist solution????????logic should work
Comments
Post a Comment