I have a banner and I'm using a loop foreach to show photos and their titles. Photos are displayed correctly but the titles are in another div below. How can I display those title inside the loop ?
<div class="slider-wrapper theme-default">
<div id="slider" class="nivoSlider">
<?php foreach($banners as $banner){?>
<img src="../admin/<?php echo $banner->link; ?>" alt="" />
<?php } ?> // end of loop
</div>
<div id="htmlcaption" class="nivo-html-caption">
<?php echo $banner->title; ?>
</div>
</div>
If I put <?php } ?>
at the end of html code , the design of banner becomes confused