Hi,
I have this situation
while ($row = $stmt->fetch(PDO::FETCH_ASSOC)){
$images[] = [
'image' => $row['image']
];
}
function image_html($image) {
return '<img src="' . $image['image'] . '" class="img-responsive" />';
}
echo '<div class="small-box">
'. image_html($images[0]) .'
</div>
<div class="small-box">
'. image_html($images[1]) .'
</div>';
// some more divs
Is it possible to check if there is no image_html($images[0])
to hide the <div class="small-box">
because right now I got empty box on the page?