Thank you for your reply. I have used check.php - tidy is showing green. I have made some progress but there is still something not right (I think)
Here is some of my code showing how I produce the document
foreach ($tabledata as $value){
$titlewf->addtext($value['SUBJECT'].' '.$value['GRADE'],
array('bold'=>'true',
'color'=>'2e74b5',
'font'=>'Arial',
'fontSize'=>'12'
)
);
$DESCRIPTION = $value['DESCRIPTION'];
$titlewf->embedHTML('<div>'.$DESCRIPTION.'</div>');
} //foreach
$docx->replaceVariableByWordFragment(array(
'SUBJECT' => $titlewf,
'GRADE'=>$titlewf
), array('type' => 'block'));
$docx->createDocx('../wordreports/fullreport/'.$filename);
I have managed to get the html code to embed - so that's great.
However, I noticed that I have to wrap the $DESCRITPION in <div> tags (as you can see - <p> tags work too). If I don't, then no word documents are produced, though no error code shows.
I checked in the database where the descriptions are located - and the are wrapped in well formed html.
Somethign doesn't 'feel' right to me.
Am I doing something wrong?
Thanks in advance