O'Reilly logo

Programming with CodeIgniter MVC by Yehuda Zadik, Eli Orr

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Example 1 – using the built-in libraries

In this initial example, we will see how to use the CI built-in library. Here we will use the CI library CI_Table as well as the CI_db library, which, for a given database table/view and some optional CSS settings, will enable us to render the table nicely with all the HTML table tags and CSS settings in just a single line of code. In this example, we will use the same user's table that we used for the controller example in Chapter 3, Usage and Scope of Controllers.

This example will be constructed from the following controller and view:

  • application/controllers/builtins.php: This controller loads the built-in CI library table as well as the db library, which is autoloaded (for more information, refer to ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required