$uniq_id = R::findOne ('users','login = ?',array($data['login']));
if (isset($_GET['search'])){
echo 'search существует';
if (empty($_GET['search'])) {
echo ' но пустой';
} else {
echo ' и не пустой. Его значение:' . $_GET['search'];
}
}
$query = "INSERT INTO c VALUES(null,$p_id ,'${_POST['и_ТАК_ТОЖЕ']}' ,'$name')";
$(document).ready(function(){
$('#id_div_kuda_dobavit').load('script.php');
});
<div id="id_div_kuda_dobavit"></div>
<script>$('#id_div_kuda_dobavit').load('script.php');</script>
$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');