2020-04-30, 11:24:45
(2020-04-30, 06:08:28)Felix Wrote: How can I do this with one for each loop ?
Do I need to use a separate for-each loop to get each field property ?
Hmm... I see only one foreach in your example?
Like this, perhaps:
PHP Code:
foreach ($my_item->fields->image->fullurl as $key => $fullurl)
{
$url = IM_SITE_URL.$fullurl;
$title = $my_item->fields->image->title[$key];
echo "<a href='$url' data-imagelightbox='g' data-ilb2-caption='$title'><img src='$url' width='100'></a>";
}
?