Hello Henric,
This is untested but this should do it:
<?php
if( get_field('kontaktpersoner') )
{
$arbetsgruppen = array();
while( has_sub_field('kontaktpersoner') )
{
$arbetsgrupp = get_sub_field('arbetsgrupp');
if(!in_array($arbetsgrupp,$arbetsgruppen))
{
array_push($arbetsgruppen,$arbetsgrupp);
}
}
foreach($arbetsgruppen as $arbetsgrupp)
{
echo $arbetsgrupp;
}
}
?>
Hey Kawaisin,
This should do the trick (untested):
<?php
if(have_rows("tombstones"))
{
$tombstonescount = 0;
while( have_rows("tombstones") )
{
$tombstonescount++;
$class = '';
$image = get_sub_field('tombstone_image');
if(i % 3 == 0)
{
$class .= 'last';
}
?>
<div class="one_third <?php echo $class;?>">
<img src="<?php echo $image['url']; ?>" alt="<?php echo $image['alt'] ?>" title="<?php echo $image['title'] ?>" />
</div>
<?php
}
}
?>