Perfect for loading a random testimonial, banner image, etc. A quick helper for your coding pleasure = ) First, create your helper (helpers/randomview_helper.php). Here are the contents: <?php if ( ! defined(‘BASEPATH’)) exit(‘No direct script access allowed’); /** * Random view */ function get_random_view($fullpath, $viewpath) { $file = str_replace(‘.php’, ”, random_element(get_filenames($fullpath))); return $viewpath.$file; } Notice [...]
Pages
Categories
- Abstract
- Adventure
- Books
- Business
- C Programming Language
- C++
- Career
- CodeIgniter
- Computer Science
- Conferences
- cURL
- Cycling
- Economics
- Frameworks
- FuelPHP
- Goals
- Hardware
- Health
- History
- Internet
- JavaScript
- Liberty
- Networking
- PCI Compliance
- Philosophy
- PHP
- Poetry
- Politics
- Programming
- Self Improvement
- Software Design
- Travel
- Version Control
- Wordpress
- XML
Archives
