<div class="row">
            <div class="col-md-12">
                <?php if (current_url() !== base_url() && current_url() !== base_url() . "home") { ?>
            <ul class="breadcrumbcont">
                <?php
                $segments = $this->uri->segment_array();
                $last_segment = '';?>
                <li>
                <a href="<?php echo base_url(); ?>">Home</a>
                </li>
                <li>/</li>
                <?php
                foreach ($segments as $segment) {
                    $last_segment .= '/' . $segment;
                    ?>
                <li>
                     <?php
                    echo '<a href="'.base_url() . substr($last_segment,1) . '">' .    ucfirst(str_replace('-', ' ', str_replace('_', ' ', $segment))) . '</a>';
                    ?>
                </li>
                     <li>/</li>
                     <?php
                }
                ?>
            </ul>
        <?php } ?>          
            </div>
        </div>


 