Separate clients in foreach with mpdf

Asked

Viewed 92 times

0

my scenario is as follows, I file a pdf using mpdf library and this pdf file is a query of intervals between client code and event date. Ex.: code: 0001 to 0004 and 0000-00-00 to 0000-00-00. It is generating the pdf with the result perfectly, but I need to separate the information of each client, because they are being displayed together, see the image and follow the code where Gero the pdf: inserir a descrição da imagem aqui

the code is here https://pastebin.com/DQrWjv3K

Thanks in advance

2 answers

0

0

The report is right. I think we should just put the product loop foreach($reports as $r) within the customer foreach($clients as $c), and after this product loop perform a page spacing or break with $mpdf->AddPage();, thus separating each customer with their products.

  • 1

    thanks, it worked that way to use the foreach inside the other.

  • 1

    @Thiagomoreira, mark the answer not to leave the question open.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.