Welcome Guest, Not a member yet? Register   Sign In
HTML Table class bug in CI 2.1.0
#1

[eluser]Unknown[/eluser]
Just a simple code from CI user guide is not working. I have checked from CI_Table class in System folder and it exists.

file
/home/application/controllers/cron_projectx.php

code:

Code:
class cron_projectx extends CI_Controller {

public function admin_reports( $arg = 1)
{
  $this->load->library('table');
  $this->table->set_heading('Name', 'Color', 'Size');
  $this->table->add_row('Fred', 'Blue', 'Small');
  $this->table->add_row('Mary', 'Red', 'Large');
  $this->table->add_row('John', 'Green', 'Medium');

  echo $this->table->generate();
}
}

call via browser:
http://example.com/index.php/cron_projec...in_reports

Output
-----------------------------------------
A PHP Error was encountered

Severity: Notice

Message: Undefined property: cron_projectx::$table

Filename: controllers/cron_projectx.php

Line Number: 9
-----------------------------------------


Messages In This Thread
HTML Table class bug in CI 2.1.0 - by El Forum - 04-19-2012, 02:09 AM
HTML Table class bug in CI 2.1.0 - by El Forum - 04-19-2012, 03:04 AM
HTML Table class bug in CI 2.1.0 - by El Forum - 04-23-2012, 02:14 AM
HTML Table class bug in CI 2.1.0 - by El Forum - 04-23-2012, 04:32 AM
HTML Table class bug in CI 2.1.0 - by El Forum - 04-23-2012, 06:23 AM
HTML Table class bug in CI 2.1.0 - by El Forum - 04-23-2012, 06:48 AM



Theme © iAndrew 2016 - Forum software by © MyBB