diff options
author | Derek Allard <derek.allard@ellislab.com> | 2008-09-14 16:58:51 +0200 |
---|---|---|
committer | Derek Allard <derek.allard@ellislab.com> | 2008-09-14 16:58:51 +0200 |
commit | 28c90a30caddf029aed48b30af097b7f26bb2b8d (patch) | |
tree | f73792369805340211d56b3cf4d17c6e31218d9b /user_guide/general/views.html | |
parent | 307cc09fda3d2b7d33f4543e6ef72b54363870f8 (diff) |
made note on view page of optional third parameter
Diffstat (limited to 'user_guide/general/views.html')
-rw-r--r-- | user_guide/general/views.html | 8 |
1 files changed, 8 insertions, 0 deletions
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 { <p><strong>Note:</strong> 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 <a href="alternative_php.html">here</a>.</p>
+<h2>Returning views as data</h2>
+
+<p>There is a third <strong>optional</strong> 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 <kbd>true</kbd> (boolean) it will return data. The default behavior is <kbd>false</kbd>, which sends it
+to your browser. Remember to assign it to a variable if you want the data returned:</p>
+
+<code>$string = $this->load->view('<var>myfile</var>', '', <kbd>true</kbd>);</code>
</div>
<!-- END CONTENT -->
|