<li><a href="javascript:void(0)"
       onclick="getCategoryID('<?php echo base_url() . 'view-category-video-courses' ?>', '<?php echo 'all'; ?>')" >All</a></li>
    <?php
    $counter = 0;
    foreach ($video_course_category as $category_value) {
        ?>
    <li><a href="javascript:void(0)"
           onclick="getCategoryID('<?php echo base_url() . 'view-category-video-courses' ?>', '<?php echo $category_value->course_category_id; ?>')" >
               <?php
               echo $category_value->course_category_name;
               ?></a>
    </li>
    <?php
    $counter++;
}
if ($total_video_course_category > $counter) {
    ?>
    <a href="javascript:void(0)" 
       onclick="moreCategory('<?php echo base_url() . 'view-more-category-video-courses'; ?>', '<?php echo $counter; ?>')">
        More....
    </a>
    <?php
}