Welcome Guest, Not a member yet? Register   Sign In
I can't to do works two functions at same times.
#8

[eluser]skunkbad[/eluser]
Yeah, because it works

Code:
// Controller method
public function page()
{
$this->load->model('the_model');

$data = array(
  'header' => $this->the_model->get_header(),
  'body'   => $this->the_model->get_body(),
  'footer' => $this->the_model->get_footer()
);

$this->load->view('template', $data);
}

// Model
class The_model extends CI_Model{

public function get_header()
{
  return 'Here goes the Header content';
}

public function get_body()
{
  return 'Here goes the Body content';
}

public function get_footer()
{
  return 'Here goes the Footer content';
}

}

// Template view (/application/views/template.php)
<html>
<head>...</head>
<body>
<?php
  echo $header;
  echo $body;
  echo $footer;
?>
</body>
</html>


Messages In This Thread
I can't to do works two functions at same times. - by El Forum - 10-12-2012, 05:55 AM
I can't to do works two functions at same times. - by El Forum - 10-12-2012, 09:40 AM
I can't to do works two functions at same times. - by El Forum - 10-12-2012, 05:52 PM
I can't to do works two functions at same times. - by El Forum - 10-12-2012, 07:26 PM
I can't to do works two functions at same times. - by El Forum - 10-13-2012, 09:19 AM
I can't to do works two functions at same times. - by El Forum - 10-13-2012, 09:27 AM
I can't to do works two functions at same times. - by El Forum - 10-13-2012, 09:40 AM
I can't to do works two functions at same times. - by El Forum - 10-13-2012, 09:49 AM
I can't to do works two functions at same times. - by El Forum - 10-13-2012, 09:56 AM
I can't to do works two functions at same times. - by El Forum - 10-13-2012, 11:28 AM
I can't to do works two functions at same times. - by El Forum - 10-14-2012, 02:37 PM
I can't to do works two functions at same times. - by El Forum - 10-14-2012, 02:51 PM



Theme © iAndrew 2016 - Forum software by © MyBB