I have an image gallery made with fancybox that all the images that appear come from the database. the gallery is something so .
I have this:
<div id="exterior">
<?php
$con = mysqli_connect("localhost","root","","gibellino");
mysqli_set_charset($con,"utf-8");
$result = mysqli_query($con, "select * from exterior");
$first = 'first';
echo "<h4>Exterior</h4>";
while($row = mysqli_fetch_array($result)){
$img = $row['img'];
echo "
<a href='images/angel/$img' rel='exterior' title='$img'><img src='images/angel/$img' alt='' id='$first'><span></span></a>
";
$first = '';
}
mysqli_close($con);
?>
</div>
and 4 more like divs only changes the id's pretty much. And it looks something like this:
AndIwantedtobeabletoadd%text,butIcannotdoitbecauseifyouputitinsidethewhilealltheimagesappearandyougetoutofthewhileImage.Thatwouldlooklikethis: