Skip to content

Instantly share code, notes, and snippets.

@arunoda
Created June 14, 2012 06:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save arunoda/2184297dae17ff06a604 to your computer and use it in GitHub Desktop.
Save arunoda/2184297dae17ff06a604 to your computer and use it in GitHub Desktop.
Codeigniter - Helpers
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Hello extends CI_Controller {
public function one($name) {
$this->load->model("hello_model", "model");
$profile = $this->model->getProfile("arunoda");
$this->load->view('header');
$data = array("n" => $name);
$data['profile'] = $profile;
$this->load->view('one', $data);
}
public function helpers() {
$this->load->helper("html");
echo heading("This is the heading");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment