query($sql);
$row = $result->fetch_assoc();
$cat = $row[‘category’];
$num = $row[‘num’];
$addDate = $row[‘addDate’];
if($cat==2){
$year = date(‘Y’, strtotime($addDate));
$month = date(‘m’, strtotime($addDate));
$d = “/stampDict/img/{$catArray[$cat]}/{$year}/{$month}/{$num}”;
}else{
$d = “/stampDict/img/{$catArray[$cat]}/{$num}”;
}
if(count($row)!=0){
?>