summaryrefslogtreecommitdiffstats
path: root/user_guide/general/views.html
diff options
context:
space:
mode:
authorDerek Allard <derek.allard@ellislab.com>2008-01-21 16:11:13 +0100
committerDerek Allard <derek.allard@ellislab.com>2008-01-21 16:11:13 +0100
commit78c3fa83531d4c1ca292f64e9383a9a4ff0f795b (patch)
treed2098d37be9c0b88a2565c2057723ef5cfe6b4f8 /user_guide/general/views.html
parent5b0a881d9251ce94114f0cc0eb6f080c163044aa (diff)
assorted guide fixes and additions
Diffstat (limited to 'user_guide/general/views.html')
-rw-r--r--user_guide/general/views.html15
1 files changed, 6 insertions, 9 deletions
diff --git a/user_guide/general/views.html b/user_guide/general/views.html
index e41503f5f..851da92e8 100644
--- a/user_guide/general/views.html
+++ b/user_guide/general/views.html
@@ -162,7 +162,7 @@ $this->load->view('blogview', <var>$data</var>);</code>
<p>Let's try it with your controller file. Open it add this code:</p>
<textarea class="textarea" style="width:100%" cols="50" rows="14">
-<?php
+&lt;?php
class Blog extends Controller {
function index()
@@ -173,7 +173,7 @@ class Blog extends Controller {
$this->load->view('blogview', $data);
}
}
-?>
+?&gt;
</textarea>
@@ -193,9 +193,6 @@ class Blog extends Controller {
<p>Then load the page at the URL you've been using and you should see the variables replaced.</p>
-<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>Creating Loops</h2>
<p>The data array you pass to your view files is not limited to simple variables. You can
@@ -205,7 +202,7 @@ pull data from your database it will typically be in the form of a multi-dimensi
<p>Here's a simple example. Add this to your controller:</p>
<textarea class="textarea" style="width:100%" cols="50" rows="17">
-<?php
+&lt;?php
class Blog extends Controller {
function index()
@@ -218,7 +215,7 @@ class Blog extends Controller {
$this->load->view('blogview', $data);
}
}
-?>
+?&gt;
</textarea>
@@ -242,12 +239,12 @@ class Blog extends Controller {
&lt;?php endforeach;?>
&lt;/ul>
-
&lt;/body>
&lt;/html>
</textarea>
-
+<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>
</div>