here is my code:
<?php
foreach ($productsRecord['images'] as $upload):?>
<?php if ($upload['hasThumbnail']): ?>
<a href="<?php echo $upload['urlPath'] ?>" rel="lightbox" class="imgborder" title="<?php echo $productsRecord['name'] ?>"><img src="<?php echo $upload['urlPath'] ?>" alt="" /></a><br />
<?php endif ?>
<?php endforeach ?>
How would I go about limiting the results to only the first result, would I use a break; statement?
Cheers
Try to use current()
your code shall like that:
To more information about the current() check the manual:
http://php.net/manual/en/function.current.php