Hello,
I am trying to create a table in CI:
controllers/ctable.php
<?php
class Table extends CI_Controller {
$this->load->library('table');
$data = array(
array('Name', 'Color', 'Size'),
array('Fred', 'Blue', 'Small'),
array('Mary', 'Red', 'Large'),
array('John', 'Green', 'Medium')
);
$this->load->view('tablefile');
}
?>
views/vtable.php
<?php
echo $this->table->generate($data);
?>
routes.php
$route['vtable'] = 'ctable';
Result:
Welcome to CodeIgniter!
The page you are looking at is being generated dynamically by CodeIgniter.
If you would like to edit this page you'll find it located at:
application/views/welcome_message.php
The corresponding controller for this page is found at:
application/controllers/welcome.php
If you are exploring CodeIgniter for the very first time, you should start by reading the User Guide.
I expect table . Why only a welcome message?