Forum


Replies: 2   Views: 3574
Addtext() does not work when adding arrays
Topic closed:
Please note this is an old forum thread. Information in this post may be out-to-date and/or erroneous.
Every phpdocx version includes new features and improvements. Previously unsupported features may have been added to newer releases, or past issues may have been corrected.
We encourage you to download the current phpdocx version and check the Documentation available.

Posted by primux  · 14-03-2013 - 02:34

Hello everyone,

I'm just getting started with PHPDOCX, we will be buying the PRO+ version, but I'm currently trying to familiarize myself with it using the free version. I'm finding that I can use addText() if I'm just using a string to add, but I can't use an array as below:
[code]require_once('classes/CreateDocx.inc');

$docx = new CreateDocx();

$text = array();

$text[] =
array(
'text' => 'Lorem ipsum',
'u' => 'single',
);

$text[] =
array(
'text' => ' sed do eiusmod tempor incididunt',
'b' => 'on',
);

$docx->addText($text);

$docx->createDocx('example_text');[/code]

Is this a limitation of the free version?

Also, with respect to the pro vrsion, I'm developing on a wAMP server on my local computer, but when I asked the head of our startup company to buy wAMP, it asked him for out domain, which we haven't bought yet, is this required? Is it possible to develop with PRO+ version locally without having a public server?

Thanks everyone,
-Primux