I have the following piece of code and I would like to display it in the reversed order:
<div id="gallery-1" class="royalSlider rsDefault visibleNearby">
<?php
$current_item = 1;
$imgID = 1;
foreach( $cats as $key => $item ){
if( !empty($cat_id) && $cat_id == $item->id ){
$current_item = $key+1;
}?>
<img class="rsImg" src="<?php echo cmMedia::getOriginalUrl($item->media_id);?>" id="imgID<?php echo $imgID; ?>" />
<a class="rsImg" href="<?php echo cmMedia::getOriginalUrl($item->media_id);?>" id="imgID<?php echo $imgID; ?>" /></a>
<?php $imgID++; }?>
</div>
the output is a slider with 26 slides.
I tried flipping the + with - and starting the variables from 26 to 1 but it didn't work :/
Thx in advance!