[eluser]skunkbad[/eluser]
[quote author="downah" date="1344073748"][quote author="Aken" date="1344060732"]1) $data will never be a variable in the view unless you set it in the $data array as $data['data'] = 'something';[/quote]
So what does this mean, it doesn't make sense to me at the slightest, put $data in $data array as ['data']? ..
Thanks[/quote]
If in your view you want to use a variable named
$something, then you can get $something to exist by doing one of two things.
Code:
// 1)
$view_data['something'] = 'whatever';
$this->load->view('some/view', $view_data);
// 2)
$arr = array('something' => 'whatever');
$this->load->vars($arr);
Notice that in example #1 the value of $view_data is not accessible in the view, but the key named "something" is as $something. I think that's what Aken was trying to convey.