Detail Page Random Upload
On the detail page, to show uploaded images in a random order, use the shuffle() function.
Here is an example of the code:
<?php shuffle($newsRecord['image']); ?>
<?php foreach ($newsRecord['image'] as $index => $upload): ?>
<img src="<?php echo htmlencode($upload['thumbUrlPath']) ?>" width="<?php echo $upload['thumbWidth'] ?>" height="<?php echo $upload['thumbHeight'] ?>" alt="" />
<?php endforeach ?>
Hope this helps!
Hire me! Save time by getting our experts to help with your project.