Welcome Guest, Not a member yet? Register   Sign In
data passed to view - using objects rather then arrays
#1

[eluser]CI2RULZ[/eluser]
passing data

$data = array(
'title' => 'My Title',
'heading' => 'My Heading',
'message' => 'My Message'
);

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

And here's an example using an object:

$data = new Someclass();
$this->load->view('blogview', $data);


can someone post an example of a controller file with Someclass being used to define the title, heading, and message? the example above is provided in documentation, but without context.


Messages In This Thread
data passed to view - using objects rather then arrays - by El Forum - 07-30-2011, 01:52 PM
data passed to view - using objects rather then arrays - by El Forum - 07-30-2011, 10:27 PM



Theme © iAndrew 2016 - Forum software by © MyBB