Greater than one upload show >=1

2 posts by 2 authors in: Forums > CMS Builder
Last Post: February 15, 2013   (RSS)

By gregThomas - February 15, 2013

Hi Zick,

You're close, you just need to use the PHP count function to check how many elements are in the array:

<?php if(count(@$homepageRecord['banners'] > 1): ?>
   <?php foreach($homepageRecord['banners'] as $banner): ?>
    //Display code goes here
   <?php endforeach; ?>
<?php endif; ?>

Thanks!

Greg

Greg Thomas







PHP Programmer - interactivetools.com