How to place content in right place in codeigniter?

I have this code, and when I call the function with mydomain/index.php/blog everything works, but the content i.e “index” in this case is being displayed in the top of the page.
I want it to be displayed in the content area, that i have defined in my css. Whats the problem?

<?php
    class Blog extends CI_Controller{

        public function __construct(){
            parent::__construct();
        }

        public function index(){

            $this->load->view('template/header');
            echo "index";
            $this->load->view('template/footer');
        }

    }
    ?>

Leave a Reply

*

Hire Me
Follow Me!
Search
Most Popular Articles & Pages
Because your vote is Important
Sorry, there are no polls available at the moment.
Categories