Re: [zick] If statment for image upload width
Hi,
add the red line to your code and see if that does what you want. The "continue" tells the "foreach" to skip the current cycle continue with the next.
<?php foreach ($photoRecord['photos'] as $upload): ?>
<?php if ($upload['height'] > 160) continue; // Skip image if height is greater than 160 ?>
<div class="PhotoContainer">
<?php if ($upload['hasThumbnail']): ?>
<img src="<?php echo $upload['thumbUrlPath'] ?>" width="<?php echo $upload['thumbWidth'] ?>" height="<?php echo $upload['thumbHeight'] ?>" border="0" class="Photo" />
<?php endif ?>
</div>
<?php endforeach ?>
-aev-