List of picture article. Problem with thumb

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

By mbareara - August 2, 2013

Hum with <?php break ?> it seems to work :-)

By gregThomas - August 2, 2013

Hi,

Glad you've solved the problem. Here is another way you could do this:

<a href="<?php echo $record['_link'] ?>">
  <?php  if($image = @$record['immagini'][0]): ?>
    <img src="<?php echo $image['urlPath'] ?>" width="120" height="90" border="0" alt="<?php echo $image['info1'] ?>" />
  <?php endif ?>
</a>

So if there is a one record in the immagini array we assign it to variable $image, then you can display the content from that image variable.

Cheers

Greg

Greg Thomas







PHP Programmer - interactivetools.com