CodeIgniter is a powerful PHP framework with a very small footprint, and very useful for website. Today I am going to introduce you the Magic function for CI like CakePHP. What is Magic Functions As the name "Magic function" there are some magic with its library which you can download from here . By using this library, you don't need to do define any function in your models all functions which you want it has already created just like magic. There is a library Magic.php which convert your function into Database Query and produce result as you want. Clone the Magic.php in your local directory and place it into application/library in your CI project. Now set this library in application/config/autoload.php . so don't need to load in every controller. $autoload['library'] = array('Magic'); Now your magic library is ready to use with $this->magic instance. Structure: $this->magic Instance of library. ->tableName set tabl...
Rising Code Challenges: A Journey from Novice to Ninja