Answer the question
In order to leave comments, you need to log in
Fancybox how to solve loop issue?
Hello. The situation actually is as follows:
I had a photo gallery in html using Fancybox.
I decided to transfer all the links to a text file, load them and run them in a loop.
Now if, when outputting, write
<a class="gallery" rel="sertifikat" href="<?php echo "/images/".$i?>">
<a class="gallery" rel="sertifikat" href="<?php echo "/images/1-lightbox.jpg"?>">
<?php
$file = fopen("/images/certificates.txt", 'r');
$s=0;
if($file)
{
while(!feof($file))
{
$i = fgets($file, 1024);
?>
<div class="superbox-list">
<a class="gallery" rel="sertifikat" href="<?php echo "/images/1-lightbox.jpg"?>">
<img src="<?php echo "/images/".$i?>" data-img="<?php echo "/images/".$i?>" alt="" class="superbox-img">
</a>
</div>
<?php
}
}
fclose($file);
?>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question