I want to make one file that contains several pages, every page should look the same as the others except for some bits of info. I have a template that I try to import and make a foreach loop and create one file, something like
[code]
require_once 'CreateDocx.inc';
$docx = new CreateDocx();
$docx->addTemplate('pink.docx');
foreach ($allthings as $allthing)
{
$docx->addHeader($header, $paramsHeader);
$docx->addTemplateVariable('INFO', $allthing->info);
$docx->addTemplateVariable('INFO"', $allthing->info2);
$docx->addTemplateVariable('CONCATINFO3AND4', $allthing->info3 . ' ' . $allthing->info4);
$docx->addBreak('page');
}
$filename = $allthing->info;
$docx->createDocx($filename);[/code]
but only one page is created...ideas?