<?php
$security_code = '#learn';
$i = 1;
foreach ($related_video_course as $v_video) {
    $id = $v_video->upload_video_id . $security_code;
    $e_id = $this->encrypt->encode($id);
    $e_id = str_replace('/', '%F2', $e_id);
    ?>
    <span class="col-sm-12">
        <span class="col-sm-6">
            <a target="_blank" href="<?php echo base_url() . 'view-video/' . $v_video->vm_url . '/' . $e_id; ?>">  
                <?php echo $v_video->upload_video_name; ?>
            </a>
        </span>
        <div class="col-sm-4" style="padding: 0px;font-size: 12px" >
            <address class="text-left" >
                <span>Uploaded</span><span style="margin-left: 10px"><?php echo date('Y-m-d', strtotime($v_video->upload_video_date)); ?></span>
                <span>Viewed</span><span style="margin-left: 20px"><?php echo $v_video->upload_video_view + 1; ?></span>
            </address>
        </div>
    </span>

    <span class="col-sm-12"><br></span>

    <?php
    $i++;
    if ($i > 5) {
        break;
    }
}
?>

<?php if (count($related_video_course) > 5) { ?>
    <span class="col-sm-12 text-right"><a href="<?php echo base_url() . 'course'; ?>">  More ..</a></span>
    <?php
}?>