
Hadassa Golovenshitz - 2013-11-24 20:06:52
Hi,
Thank you so much for this great class!
I was able to generate a docx file for download with plain vars filled in, but for a repeating table I couldn't get it to work.
Here is a part of my code:
$answers = array();
while($get_row = mysql_fetch_assoc($rs)){
$answers[] = array('q' => $get_row['label'], 'a' => $get_row['answer']);
}
...
$tmp->addParceDoc( array(
'student' => 'Hadassa Golovenshitz',
'date' => 'Today',
'form_answers' => $answers
));
This correctly fills in the date and student variables, but not the form_answer ones.
Here is a copy/paste of my template docx:
Date: {var.date}
Student: {var.student}
Form: {var.form_name}
{tbl.form_answers {
Question Answer
$ q $ a
}}
Thank you so much!!!