$db->super_query("SELECT * FROM imgtop LIMIT 2", true)
foreach($sql_img as $q)
$sql_img['name']
/**
* @var $xls \PhpOffice\PhpSpreadsheet\Writer\Xlsx
*/
$xls = $this->xls;
echo json_encode($getArticleOnId);
function foo2() use ($data) {
return foo($data);
}
<?php
$maxHistory = 20;
$addId = $_GET['id'] - 1;
$lot_history = isset($_COOKIE['lot_history']) ? (array)json_decode($_COOKIE['lot_history']) : [];
$lot_history[] = $addId;
$lot_history = array_slice(array_unique($lot_history), -$maxHistory);
setcookie("lot_history", $lot_history, strtotime("+1 day"), "/");