 <?php if ($product->testimonials_video && json_decode($product->testimonials_video)[0]):
    ?>
     <div class="card custom-sadow" id="Testimonials">
         <div class="card-header">
             <h3 class="card-title"><i class="fa fa-question-circle" aria-hidden="true"></i> &nbsp;&nbsp;Product Testimonials</h3>
         </div>
         <div class="card-body ">
             <div class="mb-4">
                 <div class="row">
                     <?php $p = 1;
                        foreach (json_decode($product->testimonials_video) as $testimonials_video):
                            $video_id_1 = explode("?v=", $testimonials_video);
                            $video_id_1 = $video_id_1[1];
                            $image_1 = "http://img.youtube.com/vi/" . $video_id_1 . "/maxresdefault.jpg";
                        ?>
                         <div class="col-sm-4">
                             <video id="video-player-<?php echo $p; ?>" class="video-player" poster="<?php echo $image_1; ?>">
                                 <source src="<?php echo file_get_contents(base_url() . 'home/video?url=' . $testimonials_video); ?>" type="video/mp4">
                                 Your browser does not support the video tag.
                             </video>
                         </div>
                         <script type="text/javascript">
                             document.addEventListener("DOMContentLoaded", function() {
                                 new Moovie({
                                     selector: "#video-player-<?php echo $p; ?>",
                                 });
                             });
                         </script>
                     <?php $p++;
                        endforeach; ?>
                 </div>
             </div>
         </div>
         <?php include 'button.php';?>
     </div>
 <?php endif; ?>