Welcome Guest, Not a member yet? Register   Sign In
what $string = $this->load->view('myfile', '', true) exactly does?
#1

[eluser]GeorgiosK[/eluser]
Quote:There is a third optional parameter lets you change the behavior of the function so that it returns data as a string rather than sending it to your browser. This can be useful if you want to process the data in some way. If you set the parameter to true (boolean) it will return data. The default behavior is false, which sends it to your browser. Remember to assign it to a variable if you want the data returned:
Code:
$string = $this->load->view('myfile', '', true);

I am not getting this...

Is the below code correct?
Code:
$data['title'] = "My Real Title";
$data['heading'] = "My Real Heading";
        
$string = $this->load->view('blogview',$data,true);

I am new to codeigniter framework...
Can someone please explain or show me a simple example?

Thank you in advance for your answers!


Messages In This Thread
what $string = $this->load->view('myfile', '', true) exactly does? - by El Forum - 08-20-2010, 03:29 AM



Theme © iAndrew 2016 - Forum software by © MyBB