How to return view’s as data in Codeigniter?
View’s can be returned as data with a third parameter ( setting to TRUE) as follows
You can use this option for many purposes. I have used it for constructing downloads and to grab and print complete html template. You can used it to build PDFs with the help of some custom libraries or function.
$output = $this->load->view('view', $data, TRUE);
You can use this option for many purposes. I have used it for constructing downloads and to grab and print complete html template. You can used it to build PDFs with the help of some custom libraries or function.
how can i use the second parameter ($data) ?
ReplyDelete