-
-
Save arunoda/4c6a81efa650ea7b7ab0 to your computer and use it in GitHub Desktop.
Codeigniter - Libraries
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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 libs() { | |
$this->load->library("table"); | |
$this->table->set_heading(array("Username", "Age")); | |
$this->table->add_row(array("Arunoda", 34)); | |
$this->table->add_row(array("John", 44)); | |
echo $this->table->generate(); | |
} | |
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