count($gallery_images)-1) { $next_image_index =0; } $previous_image_id =$gallery_images[$previous_image_index]['image_id']; $next_image_id =$gallery_images[$next_image_index]['image_id']; } echo "\n"; echo "\n"; ?>
\n"; $counter =0; foreach($gallery_images as $image) { $counter++; $clear_class=''; if ($counter % 4 == 1) { $clear_class ='clear-float'; } echo "
$image[caption]
\n"; } echo "
\n"; ?>