From 78c3fa83531d4c1ca292f64e9383a9a4ff0f795b Mon Sep 17 00:00:00 2001 From: Derek Allard Date: Mon, 21 Jan 2008 15:11:13 +0000 Subject: assorted guide fixes and additions --- user_guide/general/views.html | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'user_guide/general/views.html') 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', $data);

Let's try it with your controller file. Open it add this code:

@@ -193,9 +193,6 @@ class Blog extends Controller {

Then load the page at the URL you've been using and you should see the variables replaced.

-

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.

-

Creating Loops

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

Here's a simple example. Add this to your controller:

@@ -242,12 +239,12 @@ class Blog extends Controller { <?php endforeach;?> </ul> - </body> </html> - +

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.

-- cgit v1.2.3-24-g4f1b