ACF Repeater Example
<?php
$banner_images = array() ;
$banner_titles = array();
$banner_subtitles = array();
$banner_dates = array();
if( have_rows('home_gallery') ):
while( have_rows('home_gallery') ): the_row();
$banner_images[] = get_sub_field('banner_image');
$banner_titles[] = get_sub_field('banner_title');
$banner_subtitles[] = get_sub_field('banner_subtitle');
$banner_dates[] = get_sub_field('banner_date');
endwhile; endif;
?>
<div class="flexslider">
<ul class="slides">
<?php
$i = 0;
foreach ( $banner_images as $banner_image ) : ?>
<li>
<img src="<?php echo $banner_image ; ?>">
<div class="flex-caption">
<div class="banner_title"><?php echo $banner_titles[$i] ; ?></div>
<div class="banner_subtitle"><?php echo $banner_subtitles[$i] ; ?></div>
<div class="banner_date"><?php echo $banner_dates[$i] ; ?></div>
</div>
</li>
<?php $i++; endforeach; ?>
</ul>
</div>