[eluser]Sven Delle[/eluser]
I seem to get this A LOT. I simply wanna pass data to a view like (in controller):
Code:
public function index()
{
$data['feeback'] = 'Image was uploaded successfully';
$this->load->view('create_thumbnail', $data);
}
And from the view:
Code:
echo 'This is the create thumbnail view file: ' . $feedback;
That's what I get from reading the documentation, but I constantly run into not being able to pass that data. Now, WHAT is it that I'm not getting!?
I alse tried declaring a public array like (top of class just before constructor):
Code:
public $data = array();
And then add to the array like:
Code:
$this->data['variable'] = 'data';
But I simply cannot access ANY of the above methods data in a view ... arrrgh! I often use AJAX to retreive these views, can that be part of it?