[eluser]Unknown[/eluser]
I am new to CI.I can't get around using this function.
Code:
$string = $this->load->view('myfile', '', true);
Could any one help me by giving me a
simple example. i've read the study guide tried some codes but not working. Appreciate any help
i've tried
Code:
class Site extends CI_Controller
{
function index()
{
$data_to_send['title'] = 'Your webpage title';
$string = $this->load->view('home', $data_to_send, true);
echo $string;
}
}
A PHP Error was encountered
Severity: Notice
Message: Undefined variable: string
Filename: views/home.php
Line Number: 12
The output is NULL.