Hello,
Please note that the options to be added in the mergeDocx method depend on how you want to merge the documents and if you need to change the default values.
For example, if you want to keep existing sections and keep embedded fonts:
$merge->mergeDocx('document1.docx', array('document2.docx', 'document3.docx'), 'output.docx', array('mergeType' => 0, 'importEmbeddedFonts' => true));
The mergeType is 0 as default, so you can get the same output using:
$merge->mergeDocx('document1.docx', array('document2.docx', 'document3.docx'), 'output.docx', array('importEmbeddedFonts' => true));
If you want to remove existing sections from the second and next documents, add 5 line breaks and set page numbering as restart:
$merge->mergeDocx('document1.docx', array('document2.docx', 'document3.docx'), 'output.docx', array('mergeType' => 1, 'lineBreaks' => 5, 'numbering' => 'restart'));
All options have default values, so you don't need to include them if you don't want to change these default values. On the API documentation page (https://www.phpdocx.com/api-documentation/docxutilities/merge-Word-documents-with-PHP) are explained all available options and how they change the merge output.
In most cases, the best options are the default values:
$merge->mergeDocx('document1.docx', array('document2.docx', 'document3.docx'), 'output.docx', array());
Regards.