?> <?php $i++; } ?> </div> <!-- end all--> <!-- categories--> <?php while ($rows = $categoriess->fetch(PDO::FETCH_ASSOC)) { extract($rows); $smt = $item->getByIdCat($id); $count = $smt->rowCount(); ?> <div class="tab-1 resp-tab-content"> <?php $i = 1; while ($temp = $smt->fetch(PDO::FETCH_ASSOC)) { extract($temp); $img = json_decode($images); ?> <?php if ($i == 1) { ?> <div class="tab_img">