I want to show multiple images on product detail page dynamically in php.I have an image_arr for each product.If I click on any of the thumb images,the zoom image should change.This is what I have tried but I know its not correct as when I click on thumbnail,the image opens in the entire tab replacing my current url and page.
<?php
foreach($product_detail as $row):
$image_arr = $row['product_images'];
$first_image = $row['product_images'][0]['image_name'];
?>
<div class="col-md-6 single-right-left ">
<div class="easyzoom easyzoom--overlay easyzoom--with-thumbnails">
<a href="<?php echo base_url(); ?>images/product_detail_images/<?php echo $first_image;?>">
<img src="<?php echo base_url(); ?>images/product_detail_images/<?php echo $first_image;?>" alt="" class="main-image" />
</a>
</div>
<ul class="thumbnails">
<?php foreach($image_arr as $curr_img):
$prod_image = base_url().'images/product_detail_images/'.$curr_img['image_name'];
?>
<li>
<a href="<?php echo $prod_image; ?>" data-standard="images/detail-small-1.png">
<img src="<?php echo $prod_image; ?>" alt="" class="thumnail-main" />
</a>
</li>
<?php endforeach;?>
</ul>
</div>