News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

DevShed:
Embedding Model Data in Views with CodeIgniter
May 01, 2009 @ 07:50:47

In their final article in their "Introduction to CodeIgniter" series, DevShed has posted this look at how to create the views for their sample application. They'll output the user information pulled from a MySQL database.

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.

The new functionality they add into the application pushes an array of the user content into the "content" view. It loops through the records and outputs the first and last names as well as the user's email. Header and footer views are also included.

0 comments voice your opinion now!
codeigniter tutorial framework model data mysql view user


blog comments powered by Disqus

Similar Posts

Till Klampaeckel's Blog: Iterating over a table (with Zend_Db_Table and Zend_Paginator)

Lorna Mitchell: Compiling PHP Extensions

Felix Geisendörfer's Blog: Agile Web development (with CakePHP)

DevShed: PHP, MySQL and the PEAR Database

Chris Hartjes' Blog: Using CakePHP's Native Web Service Support


Community Events





Don't see your event here?
Let us know!


laravel zendserver symfony series list voicesoftheelephpant conference framework community api threedevsandamaybe code release podcast tips interview language bugfix deployment introduction

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework