From 28c90a30caddf029aed48b30af097b7f26bb2b8d Mon Sep 17 00:00:00 2001 From: Derek Allard Date: Sun, 14 Sep 2008 14:58:51 +0000 Subject: made note on view page of optional third parameter --- user_guide/general/views.html | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'user_guide/general') diff --git a/user_guide/general/views.html b/user_guide/general/views.html index e422c7eba..34b75c87c 100644 --- a/user_guide/general/views.html +++ b/user_guide/general/views.html @@ -246,6 +246,14 @@ class Blog extends Controller {

Note: You'll notice that in the example above we are using PHP's alternative syntax. If you are not familiar with it you can read about it here.

+

Returning views as data

+ +

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:

+ +$string = $this->load->view('myfile', '', true); -- cgit v1.2.3-24-g4f1b