[eluser]hyeteck[/eluser]
I'm new to codeigniter and the whole MVC concept. I'm trying to test some stuff out and they aren't working out the way i thought they would.
This is the html i have
Code:
<div id="wrapper">
<div id="container">
<div id="header"><p>hello</p><?= $header ?></div>
<div id="left_menu"><?= $left_menu ?></div>
<div id="content"><?= $content ?></div>
<div id="right_menu"><?= $right_menu ?></div>
<div id="footer"><?= $footer ?></div>
</div>
</div>
and here is the controller class
Code:
<?php
class Content extends Controller {
function index()
{
$data['title'] = "This is the title";
$data['header'] = $this->load->view('header');
$data['left_menu'] = $this->load->view('left_menu');
$data['content'] = $this->load->view('about_us');
$data['right_menu'] = $this->load->view('right_menu');
$data['footer'] = $this->load->view('footer');
$this->load->view('template', $data);
}
}
?>
i put in the "hello" paragraph in the html before the header is loaded but when the site is loaded, the "hello" text appears at the very end of the page after all the views are loaded. Why is this happening?
thanks