PHP Classes

Trouble getting table to work

Recommend this page to a friend!

      PHP Template Docx  >  All threads  >  Trouble getting table to work  >  (Un) Subscribe thread alerts  
Subject:Trouble getting table to work
Summary:Plain variables are going in fine, not table
Messages:8
Author:Hadassa Golovenshitz
Date:2013-11-24 20:06:52
Update:2014-06-11 14:11:14
 

  1. Trouble getting table to work   Reply   Report abuse  
Picture of Hadassa Golovenshitz 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!!!

  2. Re: Trouble getting table to work   Reply   Report abuse  
Picture of Raskin Veniamin Raskin Veniamin - 2013-11-27 16:29:52 - In reply to message 1 from Hadassa Golovenshitz
Hi.
Write me your email, i'll send you example file .docx. This site not support binary files.

  3. Re: Trouble getting table to work   Reply   Report abuse  
Picture of Jarek Jarek - 2014-01-07 23:23:41 - In reply to message 2 from Raskin Veniamin
Hi Vench, I also have problem with tables, can You provide some working example ? I have managed to fill only one row.

My mail is jarek@3e.pl

  4. Re: Trouble getting table to work   Reply   Report abuse  
Picture of Mark Cloke Mark Cloke - 2014-02-08 17:13:08 - In reply to message 2 from Raskin Veniamin
Hello, Would you be kind enough to send me an example also please.
mark.cloke@oldswords.com

  5. Re: Trouble getting table to work   Reply   Report abuse  
Picture of charith charith - 2014-06-11 14:11:14 - In reply to message 2 from Raskin Veniamin
Hey Vench, This is very cool stuff. Thank a million for it. Please send me a copy of docx file to cjanitha @ gmail .com

Thank a lot man! appreciate it a lot.

  6. Re: Trouble getting table to work   Reply   Report abuse  
Picture of Prakash Indorkar Prakash Indorkar - 2014-10-05 06:20:29 - In reply to message 2 from Raskin Veniamin
Hi vench,

I want to use this class in cakephp. As you know it is a MVC framework. I am not getting how to implement it with cakephp. Also please send me example files if you have any, to get more familiar how it works.

Really appreciated man. Nice to see people help each other and knowledge sharing is the best policy ever.

Thanks & Regards.

  7. Re: Trouble getting table to work   Reply   Report abuse  
Picture of Prakash Indorkar Prakash Indorkar - 2014-10-05 06:23:08 - In reply to message 6 from Prakash Indorkar
Sorry forgot to give you my email
its prakash9986@gmail.com

  8. Re: Trouble getting table to work   Reply   Report abuse  
Picture of Raskin Veniamin Raskin Veniamin - 2014-10-05 10:45:23 - In reply to message 7 from Prakash Indorkar
Hello . Example usage can be found here

cloud.mail.ru/public/98f2be9903a0/d ...

I am not employed by the framework , but I think the problems should not arise.

 
For more information send a message to info at phpclasses dot org.