title: PHPword insert table in template
body: <pre><code>$PHPWord = new PHPWord();
  $section = $PHPWord-&gt;createSection();
  $table = $section-&gt;addTable();
  $i = 1;
  
  $document = $PHPWord-&gt;loadTemplate('/var/sitLims/web/uploads/lmsSyllabus/lmsSyllabus.docx');
  $document-&gt;setValue('Value1', $course_number);
  $document-&gt;setValue('Value2', $course_name);
  $document-&gt;setValue('Value3', $course_en_name);
  $document-&gt;setValue('Value4', $course_summary);
  $document-&gt;setValue('Value5', $course_purposes);
  $document-&gt;setValue('Value6', $course_content);
  $document-&gt;setValue('Value7', $course_exam);
  $document-&gt;setValue('Value8', $course_description);
  $document-&gt;setValue('Value9', $syllabus_person);
  $document-&gt;setValue('Value10', $syllabus_academy_opinion);
  foreach($syllabus_experiment as $a) {
  $table-&gt;addRow();
  $table-&gt;addCell(30)-&gt;addText($i);
  $table-&gt;addCell(118)-&gt;addText($a-&gt;lmsExperiment-&gt;getExperimentName());
  $table-&gt;addCell(118)-&gt;addText('');
  $table-&gt;addCell(50)-&gt;addText($a-&gt;lmsExperiment-&gt;getExperimentExperimental());
      $table-&gt;addCell(50)-&gt;addText($a-&gt;lmsExperiment-&gt;getThisExperimentHours());
      $table-&gt;addCell(50)-&gt;addText($a-&gt;lmsExperiment-&gt;getExperimentEachNumber());
      $table-&gt;addCell(50)-&gt;addText($a-&gt;lmsExperiment-&gt;getExperimentLab());
      $table-&gt;addCell(50)-&gt;addText($a-&gt;lmsExperiment-&gt;getExperimentProjectArrange());
      $i ++;
  }
  $document-&gt;save('/var/sitLims/web/uploads/lmsSyllabus/' . $syllabus_name . '.docx');`
  </code></pre>
  
  <p>I am not sure how to insert the table when creating a word file
  Shall i insert the table in the template anywhere?</p>