WriteHTML($stylesheet, 1); // Write some HTML code $title = $_POST['field_00']; // Returns an array $field1Items = $_POST['field_01']; function fillItems($field_name){ $item = ''; $fieldItems = $_POST[$field_name]; for($i = 0; $i < count($fieldItems); $i++){ $item .= ''; } return $item; } // $items_01 = ''; // $field1Items = $_POST['field_01']; // for($i = 0; $i'; // } $html = '
Canvas Title: ' . $title[0] . '
Date: ' . $title[1] . '

Individuals Affected

' . fillItems("field_01") . '

Groups Affected

' . fillItems("field_02") . '

Behaviour

' . fillItems("field_03") . '

Relations

' . fillItems("field_04") . '

Worldviews

' . fillItems("field_05") . '

Group Conflicts

' . fillItems("field_06") . '

Product or Service Failure

' . fillItems("field_07") . '

Problematic Use of Resources

' . fillItems("field_08") . '

What can we do?

' . fillItems("field_09") . '

Uncategorised Ideas

' . fillItems("field_10") . '
'; $mpdf->WriteHTML($html, 2); // Output a PDF file directly to the browser $mpdf->Output('../saved-pdf/Ethics-Canvas.pdf', 'F'); // Add 'D' parameter for download // $mpdf->Output('MyEthicsCanvas.pdf', 'D'); ?>