如何在foreach循环中创建多个mpdf文件的动态数据?

I want to do loop of mpdf file as multiple filed with dynamic data enter image description here

This my controller: I have written the query data in controller directly:

function BillSendInvoices(){
    $query_datas = $this->db->get('tbl_custinvoices')->result();

    foreach ($query_datas as $value) {
        $pdfFilePath = date('Y_m_d_h_i_s').'-'.$value->invoicecode.".pdf";
        //load mPDF library
        $this->load->library('m_pdf');

        //generate the PDF from the given html
        $this->m_pdf->pdf->WriteHTML('hello '.$value->code);

        $this->m_pdf->pdf->Output("./pdf_invoice/".$pdfFilePath, "F");
    }
}

Please help me solve this problem.