【发布时间】:2018-03-15 04:32:03
【问题描述】:
如何在控制器中循环值将其发送到 CodeIgniter 中查看
我试过下面的代码
控制器
public function getdata()
{
$data = $this->Mdi_download_invoices->download_pdf_files(12);
foreach ($data as $d)
{
$mpdf = new \Mpdf\Mpdf();
$html = $this->load->view('download_all_invoices/pdf',$d,true);
$mpdf->WriteHTML($html);
$mpdf->Output($estructure.$d->invoice_id,'F');
}
}
查看
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<?php
echo $d->invoice_id;
?>
</body>
</html>
但视图中没有打印数据。如何打印值??
【问题讨论】:
标签: php mysql codeigniter codeigniter-3