Skip to content

Instantly share code, notes, and snippets.

@fabriziomachado
Created August 5, 2011 17:25
Show Gist options
  • Save fabriziomachado/1128035 to your computer and use it in GitHub Desktop.
Save fabriziomachado/1128035 to your computer and use it in GitHub Desktop.
application/controllers/peoples.php
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class People extends MY_Controller {
function __construct() {
parent::__construct();
}
function index()
{
$this->data['people'] = (object) array((object) array('name'=>'John'), (object) array('name'=>'Michael'));
$this->data['locals_vars'] = array('peoples'=> $this->data['people'],'say_hello'=> 'Hello World');
$this->load->view('people/index', $this->data);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment