$arr = array(
0 => "1;Изделие из золота №001;1325;1235;15",
1 => "2;Изделие из золота №002;1425;1425;15",
2 => "3;Изделие из золота №003;1300;1100;0",
);
$arItems = array();
foreach ($arr as $item) {
list(
$keys['ID'],
$keys['NAME'],
$keys['PRICE'],
$keys['DISCOUNT_PRICE'],
$keys['AMOUNT']
) = explode(";", $item);
$arItems[] = $keys;
}
var_export($arItems);
$obPHPWord = new PHPWord();
$obPHPWordDocument = $obPHPWord->loadTemplate('template.docx');
$section = $this->obPHPWord->createSection();
$table = $section->addTable();
$table->addRow(900);
// Add cells
$table->addCell(2000)->addText('Col 1');
$table->addCell(2000)->addText('Col 2');
$table->addCell(2000)->addText('Col 3');
$objWriter = PHPWord_IOFactory::createWriter($obPHPWord, 'Word2007');
$sTableText = $objWriter->getWriterPart('document')->getObjectAsText($table);
$obPHPWordDocument->setValue('myTable', $sTableText);
$obPHPWordDocument->save('result.docx');
$('.interests__item').click(function(){
if ( $('.interests__item_active').length < 5 )
$(this).toggleClass('interests__item_active');
});