random image order

3 posts by 2 authors in: Forums > CMS Builder
Last Post: March 2, 2012   (RSS)

Re: [zaba] random image order

By Jason - March 1, 2012

Hi,

If you want to randomize the order of images for an individual gallery record, you can use the php function shuffle().

For example:

<?php shuffle($record['images']); ?>

<?php foreach ($record['images'] as $image): ?>
//output image
<?php endforeach ?>


Hope this helps
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Re: [Jason] random image order

By zaba - March 2, 2012

Thanks Jason for your speedy response,
i'll give this a shot.

Much appreciated!