I have CI 2.1.3 and Template 1.9
Template 1.9 documentation stated that
set()
Set data using a chainable method. Provide two strings or an array of data.
Usage
$this->template->set('foo', $bar);Usage
$this->template->build('welcome_message', array('message' => 'Hi there!');
How can I use that foo/message variable of above example in view file?
I tried $template['foo'] and $foo in template file, but can’t get the value.
I was editing the wrong template file. I can access the variable using
format.