Welcome Guest, Not a member yet? Register   Sign In
Passing data to view
#10

[eluser]mddd[/eluser]
If you use TRUE as the 3rd parameter, the contents of the view are not sent to the browser, but returned from the function. That way you can do something with the contents. For instance:
Code:
$viewcontent = $this->load->view('myview',$test,true);
// send the view as an email
$this->email->message($viewcontent);
$this->email->send();
(Of course you would set some more settings before sending, but that's the idea).


Messages In This Thread
Passing data to view - by El Forum - 07-20-2010, 07:03 AM
Passing data to view - by El Forum - 07-20-2010, 07:06 AM
Passing data to view - by El Forum - 07-20-2010, 07:08 AM
Passing data to view - by El Forum - 07-20-2010, 07:09 AM
Passing data to view - by El Forum - 07-20-2010, 07:10 AM
Passing data to view - by El Forum - 07-20-2010, 07:11 AM
Passing data to view - by El Forum - 07-20-2010, 07:15 AM
Passing data to view - by El Forum - 07-20-2010, 07:32 AM
Passing data to view - by El Forum - 07-20-2010, 09:09 AM
Passing data to view - by El Forum - 07-20-2010, 09:13 AM
Passing data to view - by El Forum - 07-20-2010, 09:13 AM
Passing data to view - by El Forum - 07-20-2010, 09:15 AM
Passing data to view - by El Forum - 07-20-2010, 09:16 AM
Passing data to view - by El Forum - 07-20-2010, 09:18 AM



Theme © iAndrew 2016 - Forum software by © MyBB