A
Anonymous
Guest
Hi,
I have a gallery website with the following code to display images:
I would like to change the order the images appear - say once a day, so my question is , is there any way to randomize the order the images are shown. The information displayed is in json format.
Thanks for any help.
I have a gallery website with the following code to display images:
Code:
<?php
$json = file_get_contents('js/rivka-img.json');
$data = json_decode($json, true);
$galleryRivka = $data['galleryRivka'];
foreach ($galleryRivka as $entry) {
echo '<div class="main"> <div class="numbertext">'.$entry['medium']
."<hr>".$entry['titleEng'].'<hr> '.$entry['width']."cm x ".$entry['height']
.'cm</div> <img class="example" src="images/recent/'. $entry['imgMain']
.'" data-magnify-src="images/recent/'. $entry['imgMain']
.'"> </div>';
}
?>
Thanks for any help.