Home arrow PHP arrow Embedding Model Data in Views with Code Igniter

Embedding Model Data in Views with Code Igniter

Welcome to the conclusion of a seven-part series on handling views with the Code Igniter PHP framework. If you're learning how to use the Model-View-Controller schema, this series of articles can help you get a better grasp of how to use it to quickly and dynamically generate web pages. In this part, we will finish building the database-driven application we discussed in the previous part.

  1. Embedding Model Data in Views with Code Igniter
  2. Review: the first two modules of the previous web application
  3. Creating some basic view files
  4. Finishing the sample PHP application with CodeIgniter
By: Alejandro Gervasio
Rating: starstarstarstarstar / 2
April 30, 2009

print this article




The intrinsic flexibility offered by the CodeIgniter framework gives PHP developers the ability to handle views in several clever ways. This feature allows you to easily generate dynamic sections of web pages. From loading views sequentially and using layout views, to nesting them within other views, CI offers plenty of options that permit you to quickly build front-ends without having to struggle with the schema dictated by the Model-View-Controller pattern.

However, for newcomers just starting to develop PHP applications with CodeIgniter, working with views in more complex ways can be challenging. Thus, if youíre stuck within a maze of controllers and donít know how to make them interact with your views, then you should take a look at this group of articles, since theyíll show you different approaches that you can use for manipulating views in a truly efficient way.

And now that youíre well aware of the subject of this series of tutorials, itís time to spend a moment refreshing the topics that were treated in the last article, in case you havenít had the opportunity to read it yet. In that part, I explained how to build a simple database-driven application, whose main functionality was based on displaying on screen a few user-related records, previously fetched from a MySQL table.

In its current state, the structure of this sample application looked rather incomplete. It was comprised of a model and a controller class, where the first was responsible for retrieving user data from the table, and the second was charged with embedding this data in some view files, which actually havenít been defined yet.

Therefore, in this final chapter of the series Iíll be creating these views, completing the development of this basic database-driven PHP program using CodeIgniter. By the end of this article, youíll be equipped with a decent background not only in creating basic PHP applications with CI, but in manipulating views in an effective way.

Are you ready to tackle the last episode of this educational journey? Then, letís get started right now!

>>> More PHP Articles          >>> More By Alejandro Gervasio

blog comments powered by Disqus
escort Bursa Bursa escort Antalya eskort


- Hackers Compromise PHP Sites to Launch Attac...
- Red Hat, Zend Form OpenShift PaaS Alliance
- PHP IDE News
- BCD, Zend Extend PHP Partnership
- PHP FAQ Highlight
- PHP Creator Didn't Set Out to Create a Langu...
- PHP Trends Revealed in Zend Study
- PHP: Best Methods for Running Scheduled Jobs
- PHP Array Functions: array_change_key_case
- PHP array_combine Function
- PHP array_chunk Function
- PHP Closures as View Helpers: Lazy-Loading F...
- Using PHP Closures as View Helpers
- PHP File and Operating System Program Execut...
- PHP: Effects of Wrapping Code in Class Const...

Developer Shed Affiliates


Dev Shed Tutorial Topics: